Conversation
it keeps the naming consistent and makes it easier to figure out what the difference between e.g. the test and test_windows targets are.
fho
left a comment
There was a problem hiding this comment.
looks great, thanks a lot for the PR
| const echoStr = "hello world!" | ||
|
|
||
| res, err := Command("echo", "-n", echoStr).Run() | ||
| // Windows returns StrOutput with surrounding quotation marks |
There was a problem hiding this comment.
The windows echo command prints the string quoted?
Or all output that is returned from running commands via the stdlib exec package is quoted?
There was a problem hiding this comment.
I have investigated this further and the results are quite interesting.
I created a simple app that runs a few different commands with a couple of different inputs, I then ran this on Windows and Linux.
Here are the results:
Running on Windows

Running on Linux

Summary:
- cmd adds quotation marks around the string if it contains spaces
- PowerShell wraps the output onto a new line at the space if it contains spaces
- more on Linux outputs headers and footers, Windows doesn't
There was a problem hiding this comment.
Ok, so the echo command is probably also a shell builtin command like for bash and the implementation of it in cmd and PowerShell differ.
When commands are invoked without a shell, the output that is returned by the exec package should not be quoted.
There was a problem hiding this comment.
That is my understanding.
Windows doesn't have an echo executable so it must be invoked from a shell. However it does have a more executable and when it is invoked the file contents are not quoted.
|
I noticed that the test results were not being reported in CircleCI. After a bit of investigation I found that the go-test-report.xml file was being generated with Unicode encoding which was causing the problem. |


This change set addresses #94 and ports baur to Windows. The
make releasecommand will create a baur.exe file.Things to note:
cmd /Con Windows.-raceflag has been removed from the Windowsgo testcommand as a gcc compiler is not installed. I figured this wasn't a problem as it is used in the existing test job. This could be addressed later if necessary.