Closed lordgordon closed 7 years ago
Hi there. The issue stems from the newline characters used within the shell script being executed (which is different depending on the host system). If you use the path
option instead of inline
, Vagrant can automatically convert these for you. For more information see:
https://www.vagrantup.com/docs/provisioning/shell.html#binary
Cheers!
@chrisbaldauf
Hi Chris,
thank for your suggestion. I tried it yet I still have the bug. I also tried to add the option to the "file" provisioning, yet the binary option is not supported.
Vagrant version: 1.9.1 Host: Windows 10
Vagrantfile (interesting line):
config.vm.provision "shell", inline: "/usr/local/bin/bash /vagrant/provisioning_local/scripts/always/system_update.sh", privileged: false, run: "always", binary: true
I'm now going to upgrade to Vagrant 1.9.3 and I let you know if the issue persists.
Regards,
Nicholas
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.
Hi there,
I have a Windows 10 host and I'm unable to provision my FreeBSD guest using shell script (bash format). The script is not executed due to invalid syntax. Yet, everything is working fine on my macOS host.
In fact the shell script loaded with Windows as host is different from the original one I have with macOS as host (different
shasum --binary
). With an hex editor I see different line termination characters.Shared folder in Windows is done with
rsync
.Vagrant version
Vagrant 1.9.1
Host operating system
Windows 10 home (fully updated) Rsync (cwRsync) version 3.1.2 protocol version 31.
Guest operating system
FreeBSD 11.0-STABLE
Vagrantfile
Vagrant output
Expected behavior
The shell provisioning should be executed without issues.
Actual behavior
The shell provisioning fails due to improper file format.
Steps to reproduce
vagrant up
;References