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

inconsistent working directory on (re)provision with shell script #4745

Closed
techtonik opened this issue Oct 29, 2014 · 1 comment
Closed

inconsistent working directory on (re)provision with shell script #4745

techtonik opened this issue Oct 29, 2014 · 1 comment

Comments

@techtonik
Copy link
Contributor

The current working directory is different between vagrant up and vagrant provision commands:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'gratipay'...
==> default: Matching MAC address for NAT networking...
...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => E:/p/gratipay.com
==> default: Running provisioner: shell...
    default: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20141029-8552-k8vfqq.sh
==> default: stdin: is not a tty
==> default: Working in /home/vagrant
==> default: grep: README.md
==> default: : No such file or directory
==> default: make: *** No rule to make target `clean'.  Stop.
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.

vagrant provision

==> default: Running provisioner: shell...
    default: Running: C:/Users/user/AppData/Local/Temp/vagrant-shell20141029-4640-1xegaey.sh
==> default: stdin: is not a tty
==> default: Working in /vagrant
==> default: psql:/vagrant/scripts/create_db.sql:1: ERROR:  role "gratipay" already exists
...

using vagrant 1.6.5

@techtonik
Copy link
Contributor Author

My fault. This provisioning script changed login dir from /home/vagrant to /vagrant https://github.com/gratipay/gratipay.com/blob/1722/scripts/vagrant-setup.sh#L6

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant