Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on Windows. #5

Open
baileyn opened this issue Jul 14, 2015 · 6 comments
Open

Tests fail on Windows. #5

baileyn opened this issue Jul 14, 2015 · 6 comments

Comments

@baileyn
Copy link
Contributor

baileyn commented Jul 14, 2015

The default tests for runcmd_test.go fail on windows. By default hf uses cat $FILES and cat $FILES | wc -l as test commands. On Windows, cat is an alias in Powershell. When the default shell is changed to use powershell -Command instead of cmd /c, the cat command works for one file, but it will not work for multiple files.

@hugows
Copy link
Owner

hugows commented Jul 14, 2015

I think now runcmd.go works on both systems.

@hugows hugows closed this as completed Jul 14, 2015
@hugows
Copy link
Owner

hugows commented Jul 14, 2015

But I have gnuwin cat installed... it will probably fail for you.

@hugows hugows reopened this Jul 14, 2015
@baileyn
Copy link
Contributor Author

baileyn commented Jul 14, 2015

I ran the test on windows, and it passed fine. I was using the powershell terminal, but I don't think that really matters considering cmd /c is called from runCmdWithArgs,

@hugows
Copy link
Owner

hugows commented Jul 14, 2015

I still testing what is the best behaviour there - use cmd /c for
everything, let the user choose (current behaviour), use heuristics to find
out what kind of programs should be called with shell, etc.

On 14 July 2015 at 13:09, Nicholas Bailey [email protected] wrote:

I ran the test on windows, and it passed fine. I was using the powershell
terminal, but I don't think that really matters considering "cmd /c" is
called from runCmdWithArgs,


Reply to this email directly or view it on GitHub
#5 (comment).

@baileyn
Copy link
Contributor Author

baileyn commented Jul 14, 2015

I would say either let the user choose the default command to be used, or check if powershell exists, and if not default down to cmd.

powershell -Command is the equivalent of cmd /c, but powershell has aliases such as ls, cat, and a few others which cmd will refuse to execute.

@sergeevabc
Copy link

Dear Nicholas,
Could you be so kind to generate .exe for the rest of us who are mere Windows users w/o compiler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants