Skip to content

Commit d9e8f1f

Browse files
authored
Merge pull request #135 from LandRegistry/develop
2.1.1
2 parents c2b9f85 + e8e31dc commit d9e8f1f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

logic.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
# Does a version check and self-update if required
7777
if options['self_update']
78-
this_version = '2.1.0'
78+
this_version = '2.1.1'
7979
puts colorize_lightblue("This is a universal dev env (version #{this_version})")
8080
# Skip version check if not on master (prevents infinite loops if you're in a branch that isn't up to date with the
8181
# latest release code yet)

scripts/provision_hosts.rb

+4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ def provision_hosts(root_loc)
2525
end
2626

2727
def hosts_filename
28+
wsl_version_filename = '/proc/version'
2829
if !(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil?
2930
# WINDOWS
3031
'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'
3135
else
3236
# LINUX or MAC OS (NOT TESTED)
3337
'/etc/hosts'

0 commit comments

Comments
 (0)