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

Recursive call fails on Windows #16

Closed
andraaspar opened this issue May 15, 2015 · 7 comments
Closed

Recursive call fails on Windows #16

andraaspar opened this issue May 15, 2015 · 7 comments

Comments

@andraaspar
Copy link

The command:

parallelshell "echo foo" "parallelshell ""echo bar"" ""echo baz"" "

Results in:

foo
'\"echo' is not recognized as an internal or external command,
operable program or batch file.
'bar\"' is not recognized as an internal or external command,
operable program or batch file.
`"echo` failed with exit code 1
`parallelshell "echo bar" "echo baz" ` failed with exit code 1
@keithamus
Copy link
Collaborator

Hey @andraaspar thanks for the issue.

It looks as though you might need to escape some of those quotes - as I'm not sure Windows would be able to recognise them like that, although I can't be sure.

Try this:

parallelshell "echo foo" "parallelshell \"echo bar\" \"echo baz\""

@andraaspar
Copy link
Author

Done, here's the output:

parallelshell "echo foo" "parallelshell \"echo bar\" \"echo baz\""
foo
'\"echo' is not recognized as an internal or external command,
operable program or batch file.
'bar\"' is not recognized as an internal or external command,
operable program or batch file.
`"echo` failed with exit code 1
'\"echo' is not recognized as an internal or external command,
operable program or batch file.
`parallelshell "echo bar" "echo baz"` failed with exit code 1

@andraaspar
Copy link
Author

FYI, I have also tried:

parallelshell "echo foo" "parallelshell ^"echo bar^" ^"echo baz^""

Which gives:

foo
'bar' is not recognized as an internal or external command,
operable program or batch file.
'baz' is not recognized as an internal or external command,
operable program or batch file.
`bar echo` failed with exit code 1

@andraaspar
Copy link
Author

But "" as an escape sequence seems to work with child_process.exec in addenv-cli. Of course, migrating to child_process.exec may not be trivial.

@andraaspar
Copy link
Author

FYI, I have reported this as a Node.js bug.

@paulpflug
Copy link
Collaborator

should work with #30

@andraaspar
Copy link
Author

It does indeed.

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

Successfully merging a pull request may close this issue.

3 participants