I chose the D:\ drive during installation but when I download a vagrant box it downloads to my user directory on C:\ drive. I am using a SSD with hardly any available space. How do I make it download boxes to another drive?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
由
翻译强力驱动
问题:
回答1:
You can use the VAGRANT_HOME environment variable to change the vagrant config / box download directory.
On Windows you should be able to use the setx
command to change it, for example:
setx VAGRANT_HOME "D:/vagrant"
However, I found a similar stack overflow question where users are suggesting that the environment variable doesn't always work and that changing the @home_path
found in vagrant\embedded\gems\gems\vagrant-1.x.x.dev\lib\vagrant\environment.rb
worked for them.