gitlab-runner output issues in PowerShell
Summary
OS: Windows 10 1511 PowerShell Version: 5.0 Runner verison: 1.11.1 (a67a225)
gitlab-runner executable doesn't output in consistent or expected ways in PowerShell 5.0, Windows 10 1511. Output is redirected to the error stream, and therefore cannot be captured in expected ways.
Steps to reproduce
Run any gitlab-runner command, then query the $Error variable. You can also attempt to output the standard stream to a file, then try the error stream. Only the error stream works.
gitlab-runner.exe list
$Error
gitlab-runner list > example.txt # Standard stream
gitlab-runnerlist 2> example.txt # Error stream
What is the current bug behavior?
gitlab-runner outputs the the error stream for non error output.
What is the expected correct behavior?
gitlab-runner outputs to the standard output stream.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
PS C:\gitlab-runner> .\gitlab-runner.exe verify > test.txt
Verifying runner... is alive runner=96d80b8a
PS C:\gitlab-runner> gc .\test.txt
PS C:\gitlab-runner> .\gitlab-runner.exe verify 2> test.txt
PS C:\gitlab-runner> $Error
.\gitlab-runner.exe : Verifying runner... is alive runner=96d80b8a
At line:1 char:1
+ .\gitlab-runner.exe verify 2> test.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Verifying runne...r=96d80b8a:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError