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

Packer build cannot find binary if path contains spaces on Windows #10

Open
jeffbrl opened this issue Feb 9, 2019 · 0 comments
Open

Comments

@jeffbrl
Copy link

jeffbrl commented Feb 9, 2019

If this script installs packer in a Windows directory that contains spaces, the packer build command will fail as it cannot locate the packer binary.

Executing command:C:\Users\Jeff Loughridge\packer-bin\packer build --parallel=false -var boot_time=2m30s -var name='20190209_082254' vEOS-windows.json
'C:\Users\Jeff' is not recognized as an internal or external command,
operable program or batch file.
Return code:1
Packer install failed!!!

I fixed this by putting double quotes around the path to the binary.

   try:
        if (hyper == "virtualbox" and hostOS=="windows"):
            cmd = '"%s" build --parallel=false %s vEOS-windows.json' % (packerCmd, OPTS)
            print "Executing command:%s" % cmd

Please let me know if you want me to submit a PR.

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

1 participant