Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

vagrant exec pwd is /vagrant by default #1432

Closed
mikemadison13 opened this issue Jun 16, 2017 · 3 comments
Closed

vagrant exec pwd is /vagrant by default #1432

mikemadison13 opened this issue Jun 16, 2017 · 3 comments
Labels

Comments

@mikemadison13
Copy link

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.9.5
VirtualBox 5.1.22r115126
ansible 2.3.0.0
  config file = 
  configured module search path = Default w/o overrides
  python version = 2.7.13 (default, Apr  4 2017, 08:46:44) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]

Your OS

  • macOS 10.11.6

Full console output

$ vagrant exec pwd
/vagrant

Summary

This is a cross post from acquia/blt#1681 where running Behat commands with BLT w/in DrupalVM are failing. Digging into this, it seems that my vagrant config is looking in the wrong place (/vagrant vs. /var/www/). As a result, I am getting composer autoload errors.

It seems like we may need to set the exec pwd path in the VM so that things are running the proper location?

cc @grasmash and @geerlingguy

@oxyc
Copy link
Collaborator

oxyc commented Jun 16, 2017

The vagrant-exec plugin isn't configured out of the box, but there's a docs page on it http://docs.drupalvm.com/en/latest/extras/drupal-console/#remote-command-execution-using-vagrant-exec

@geerlingguy
Copy link
Owner

It looks like there's a PR #1435 related to this issue.

I'm still on the fence on whether I want to add explicit conditional config for this as part of Drupal VM. For my own needs, outside of BLT, I've not yet had a use case where vagrant exec was essential... just a nice little tool if you really want to use it. But for most things, using vagrant ssh or automating things via Ansible or Drush to work in the VM is easier/faster.

cc @grasmash

@geerlingguy geerlingguy changed the title vagrant exec pwd path issues vagrant exec pwd is /vagrant by default Jun 19, 2017
@geerlingguy
Copy link
Owner

It looks like this was fixed downstream, in BLT; see acquia/blt#1681 and acquia/blt@1bc9e39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants