paliarush / magento2-vagrant-for-developers

Vagrant Box for Magento 2 Developers
MIT License
447 stars 165 forks source link

Inline host_shell tar execution failing in Vagrantfile - Windows #195

Open cbarter opened 6 years ago

cbarter commented 6 years ago

I've tried a ton of things, not sure where to go from here... I can execute the compress myself locally, and then on the vagrant box I can uncompress and rm the .tar... so I can get around it. But It would be great to have this work on it's own.

Windows 7, Vagrant 1.9.6

if !use_nfs_for_synced_folders
    config.vm.provision "host_compress_magento_code", type: "host_shell", inline: "tar cf scripts/host/magento2ce.tar magento2ce"
    config.vm.provision "guest_uncompress_magento_code", type: "shell", inline: "mkdir -p /var/www && tar xf /vagrant/scripts/host/magento2ce.tar -C /var/www &>/dev/null"
    config.vm.provision "guest_remove_compressed_code", type: "shell", inline: "rm -f /vagrant/scripts/host/magento2ce.tar"
end

init_project.sh.log:

==> magento2.vagrant167: Running provisioner: host_compress_magento_code (host_shell)... [stderr] /usr/bin/tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options Try '/usr/bin/tar --help' or '/usr/bin/tar --usage' for more information. ==> magento2.vagrant167: Running provisioner: guest_uncompress_magento_code (shell)... magento2.vagrant167: Running: inline script [2018-06-27 20:27:52] The SSH command responded with a non-zero exit status. Vagrant [2018-06-27 20:27:52] ERROR: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. nknown source file]] assumes that this means the command failed. The output for this command error: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. should be in the log above. Please read the output to determine what went wrong. nknown source file] went wrong. nknown source file] [2018-06-28 03:27:57] STATUS: Checking if all required directories were mounted successfully [/vagrant/scripts/guest/check_mounted_directories]] [2018-06-28 03:27:58] ERROR: > Directory '/var/www/magento2ce' was not mounted as expected and Magento code base is not accessible on the guest machine. If your host is OSX or *nix, please make sure that Vagrant is able to mount NFS shares on your environment (see https://github.com/paliarush/magento2-vagrant-for-developers/issues/88#issuecomment-254854019 ). Also remove any stale declarations from /etc/exports on the host. [/vagrant/scripts/guest/check_mounted_directories]]

cbarter commented 6 years ago

I was running gitbash with permissions as well.

Hamsa1991 commented 6 years ago

any solution?