宅基地全球范围内,与特定的宅基地和颠沛流离的文件夹
问题描述:
我想宅基地使用全球,但我不希望我的“.homestead”目录是在C:\用户\帕特里\ .homestead宅基地全球范围内,与特定的宅基地和颠沛流离的文件夹
我想这是在d:\ VBOX \ .homestead
而且在运行时homestead up
,我想宅基地寻找已位于下载的有框:d:\ vbox.vagrant.d \箱 这是因为我已经有许多箱子,和宅基地将重新下载相同的盒子和“.vagrant”文件夹,在C添加它们:\用户\帕特里\ .homestead
这可能吗?
我在Windows 10
答
而不是做composer global require "laravel/homestead=~2.0"
的,我用git安装:git clone https://github.com/laravel/homestead.git
。
然后,宅基地/供应商/箱里面,我有一个homestead.bat:
@echo off
set cwd=%cd%
set homesteadVagrant=D:\htdocs\laracasts\Homestead
cd /d %homesteadVagrant% && vagrant %*
cd /d %cwd%
set cwd=
set homesteadVagrant=
我再宅基地/供应商/ bin加入到我的道路。现在
我可以使用homestead
无处不在。
对于流浪汉,所述VAGRANT_HOME environement变量设置为d:\ vbox.vagrant.d
编辑: 的homestead.bat被简单地使用全局流浪汉。 所以你不会有编辑选项。 拥有它,你可以这样做:
@echo off
set cwd=%cd%
set homesteadVagrant=D:\htdocs\laracasts\Homestead
if "%1" == "edit" goto end
cd /d %homesteadVagrant% && vagrant %*
cd /d %cwd%
:end
cd /d %homesteadVagrant% && start t Homestead.yaml
cd /d %cwd%
set cwd=
set homesteadVagrant=