File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 75
75
76
76
# Does a version check and self-update if required
77
77
if options [ 'self_update' ]
78
- this_version = '2.1.0 '
78
+ this_version = '2.1.1 '
79
79
puts colorize_lightblue ( "This is a universal dev env (version #{ this_version } )" )
80
80
# Skip version check if not on master (prevents infinite loops if you're in a branch that isn't up to date with the
81
81
# latest release code yet)
Original file line number Diff line number Diff line change @@ -25,9 +25,13 @@ def provision_hosts(root_loc)
25
25
end
26
26
27
27
def hosts_filename
28
+ wsl_version_filename = '/proc/version'
28
29
if !( /cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM ) . nil?
29
30
# WINDOWS
30
31
'C:/Windows/System32/drivers/etc/hosts'
32
+ elsif File . file? ( wsl_version_filename ) && File . foreach ( wsl_version_filename ) . any? { |l | l [ 'microsoft' ] }
33
+ # assume on Linux via WSL
34
+ '/mnt/c/Windows/System32/drivers/etc/hosts'
31
35
else
32
36
# LINUX or MAC OS (NOT TESTED)
33
37
'/etc/hosts'
You can’t perform that action at this time.
0 commit comments