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

Fixed broken PowerShell execution #3210

Merged
merged 1 commit into from
Mar 14, 2014
Merged

Fixed broken PowerShell execution #3210

merged 1 commit into from
Mar 14, 2014

Conversation

jyggen
Copy link
Contributor

@jyggen jyggen commented Mar 14, 2014

Commit 621369e which is supposed to fix issue #3100 actually seems to break execution completely. While trying to solve #3139 I encountered the same problem as in #3192 where the JSON couldn't be parsed.

I dumped stdout from the process into a file (File.write("C:/test.txt", r.stdout)) and the output was the path to the actual script and not the generated JSON. It seems like wrapping the path in single quotation marks just passes it as a string to PowerShell, who have no clue what to do and just throws the string back at you.

I did a quick search and proper way to execute scripts with "spaced paths" seems to be this way. This commit should fix the problem encountered in #3192 and actually fix #3100.

@mitchellh
Copy link
Contributor

Thanks, this looks right. Sorry about that!

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

Successfully merging this pull request may close these issues.

Powershell Error in Vagrant 1.5 With Hyper-V Provider When Vagrant Path Contains Spaces
2 participants