简体   繁体   English

如何使用Vagrant更新来宾VM的$ PATH

[英]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. 我正在尝试导出来宾虚拟机的$ PATH以便能够使用minishift命令。 This is what I have in the Vagrantfile, but is not working, any hint? 这是我在Vagrantfile中拥有的内容,但是没有任何提示吗?

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

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 "~/" 由于某种原因,Vagrant无法正确解释“〜/”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM