-
Notifications
You must be signed in to change notification settings - Fork 79
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
PowerShell command does not die #54
Comments
Please include the code you're using to run PowerShell and CMD through ChildProcess. |
Can you reproduce the problem without the Vagrant wrapper? What do you mean by "does not die" - do you see ChildProcess is not executing the command in a shell, it is executing I don't have a windows machine to try this on at the moment, but if you want anything interpreted as in process = ChildProcess.build("cmd.exe", "/c", "powershell Expand-Archive ...")
process.start |
Correct powershell.exe remains running as a child process long after the Expand-Archive has finished, which I can see in process explorer. I tried the ;exit $LASTEXITCODE for force the powershell.exe process to terminate after running the command Expand-Archive. PowerShell has the equivalent of cmd.exe /c being PowerShell.exe -Command but even if I use that something in the way how ChildProcess spawns powershell keeps it from exiting when done. |
I very much doubt the problem is ChildProcess. Have you tried passing the |
Also, your gist does not use ChildProcess.build("PowerShell.exe", "-Command", "the full command in a string") |
Going to close this since there's no response in a month. |
NOTE: Not sure if this is a childprocess issue or Powershell.
The following Powershell command will echo and then exit if executed in a CMD shell, however if the same is invoked through childprocess this doesn't happen.
PS> echo hello; exit $LASTEXITCODE
The text was updated successfully, but these errors were encountered: