-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
shell-local post-processor results in errors on Windows #4140
Comments
confirmed this. the problem seems to be that powershell.exe won't run any file that doesn't end in ".ps1" and we write the script to something like packer-shell123456 |
Hmm. That might be part of the problem too, but I'm also seeing it when trying to run a Python script, and Python isn't constrained to only running files with certain extensions. I've updated my gist with a Python script and its output. It has the same empty error message. |
alright I think the problem is that the post-processor communicator uses I manually changed it to use |
Maybe we should have a On Nov 10, 2016 01:57, "Matthew Hooker" notifications@github.com wrote: alright I think the problem is that the post-processor communicator I manually changed it to use exec.Command("Powershell.exe", "-command", — |
Hmm. Well I hope it, or something like it, stays around, because I've found it to be very useful. A powershell-local (or cmd-local, which I could use to invoke Powershell or any other scripting language myself) would definitely solve my problem too. |
I thinks we can change default for each builder.... |
I've stumbled on this trying to get .msu files to execute. Basically I'm trying to get a Vagrant Win7 basebox without the dreaded 100% CPU windows update bug and that involves installing three .msu files with in-between reboots just so we can run windows update again. But wusa.exe does not allow .msu execution over winRM so I thought I would do it locally - hence my landing here. I switched back to
as a workaround but I'm not having much success with it either. |
It seems to me that the point of having an "execute_command" option is to allow the entire command to be configurable. So why not wait until we can make a backwards-breaking change, and then entirely remove the assumption of a shell command? This seems to me to be the way the feature is documented, anyway. For example (pardon the naive string handling, was just pounding this out to see if it'd work):
Which you can then use a provisioner with like this:
|
Closing because we have decided to deprecate this post-processor instead of fixing it; #5330 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
When I try to use the
shell-local
post-processor in Windows, it fails with an empty error message.Is this working under Windows? Have I done something wrong?
The text was updated successfully, but these errors were encountered: