Search code examples
bashvagrantdevopsminishift

How to update $PATH of guest vm using vagrant


I'm trying to export the $PATH of a guest vm to be able to use the minishift command. This is what I have in the Vagrantfile, but is not working, any hint?

mvm.vm.provision :shell, :inline => "echo 'export PATH=$PATH:~/minishift-1.7.0-linux-amd64' >>~/.bashrc"

Solution

  • The solution is the next:

    mvm.vm.provision :shell, :inline => "echo 'export PATH=$PATH:/home/vagrant/minishift-1.7.0-linux-amd64' >>/home/vagrant/.bashrc"
    

    For some reason Vagrant is not interpreting correctly "~/"