From a26ac5b363ad4c3c187dd337c556c07997bde489 Mon Sep 17 00:00:00 2001 From: Dave Rael Date: Mon, 11 Jan 2016 05:32:39 -0700 Subject: [PATCH] :art: Improve readability of multi-line command --- src/browser/squirrel-update.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/browser/squirrel-update.coffee b/src/browser/squirrel-update.coffee index f9df3c0b5..41e103363 100644 --- a/src/browser/squirrel-update.coffee +++ b/src/browser/squirrel-update.coffee @@ -58,7 +58,12 @@ spawnReg = (args, callback) -> spawnPowershell = (args, callback) -> # set encoding and execute the command, capture the output, and return it via .NET's console in order to have consistent UTF-8 encoding # http://stackoverflow.com/questions/22349139/utf-8-output-from-powershell - args[0] = "[Console]::OutputEncoding=[System.Text.Encoding]::UTF8\r\n$output=#{args[0]}\r\n[Console]::WriteLine($output)" + # to address https://github.com/atom/atom/issues/5063 + args[0] = """ + [Console]::OutputEncoding=[System.Text.Encoding]::UTF8 + $output=#{args[0]} + [Console]::WriteLine($output) + """ args.unshift('-command') args.unshift('RemoteSigned') args.unshift('-ExecutionPolicy')