// , Vagrant worked fine the day before yesterday, and, today, when even doing the innocuous command
vagrant version, I get an error like the following:
duper/provision_vault/data/sys/namespaces | 👾 vagrant version
/opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/environment.rb:88:in `pwd': No such file or directory - getcwd (Errno::ENOENT)
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/lib/vagrant/environment.rb:88:in `initialize'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/bin/vagrant:144:in `new'
from /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/bin/vagrant:144:in `<main>'
In a separate terminal, though, vagrant suspend and vagrant status run just fine:
👾 vagrant status
Current machine states:
instance5 saved (virtualbox)
instance6 saved (virtualbox)
instance7 saved (virtualbox)
db saved (virtualbox)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.
👾 vagrant suspend
==> instance5: Saving VM state and suspending execution...
==> instance6: Saving VM state and suspending execution...
==> instance7: Saving VM state and suspending execution...
==> db: Saving VM state and suspending execution...
Git status fails, as well:
duper/provision_vault/data/sys/namespaces | 👾 git status
fatal: Unable to read current working directory: No such file or directory
I think this is an effect of being in an "Orphaned directory", because, although I created the directory in the failing shell, switching to a different Git branch automatically deleted that directory.
Thus, Vagrant cannot recurse up to its Vagrantfile, and fails with getCwd. Is there any way for this to degrade gracefully, or provide a better error message?
I probably should have noticed that I was in a missing directory, but I think it would have been easier to spot if I'd had a more intelligible error message.
What do you all think? I ended up scratching my head a bit and trying to re-install Vagrant. Do you think this is worth making less confusing, not a big issue, resolvable with Vagrant documentation, or something else?