Merge pull request #49 from Tpbrown/git-bash-windows
Support Cygwin and MinGW on Windows. Fixes #24
This commit is contained in:
commit
a426b8503a
|
@ -10,7 +10,8 @@ module VagrantPlugins
|
||||||
realhostfile = '/etc/inet/hosts'
|
realhostfile = '/etc/inet/hosts'
|
||||||
move_cmd = 'mv'
|
move_cmd = 'mv'
|
||||||
elsif (machine.communicate.test("test -d $Env:SystemRoot"))
|
elsif (machine.communicate.test("test -d $Env:SystemRoot"))
|
||||||
realhostfile = 'C:\Windows\System32\Drivers\etc\hosts'
|
realhostfile = "#{ENV['WINDIR']}\\System32\\drivers\\etc\\hosts"
|
||||||
|
|
||||||
move_cmd = 'mv -force'
|
move_cmd = 'mv -force'
|
||||||
else
|
else
|
||||||
realhostfile = '/etc/hosts'
|
realhostfile = '/etc/hosts'
|
||||||
|
@ -38,7 +39,7 @@ module VagrantPlugins
|
||||||
hosts_location = '/etc/hosts'
|
hosts_location = '/etc/hosts'
|
||||||
copy_cmd = 'sudo cp'
|
copy_cmd = 'sudo cp'
|
||||||
# handles the windows hosts file...
|
# handles the windows hosts file...
|
||||||
if ENV['OS'] == 'Windows_NT'
|
if ENV['SystemRoot'] != nil
|
||||||
hosts_location = "#{ENV['WINDIR']}\\System32\\drivers\\etc\\hosts"
|
hosts_location = "#{ENV['WINDIR']}\\System32\\drivers\\etc\\hosts"
|
||||||
copy_cmd = 'cp'
|
copy_cmd = 'cp'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue