lib/rake/funnel/support/mono.rb in rake-funnel-0.20.2 vs lib/rake/funnel/support/mono.rb in rake-funnel-0.21.0
- old
+ new
@@ -4,14 +4,21 @@
class Mono
class << self
def invocation(executable, *args)
exe_args = ([executable] << args).flatten.compact
- return exe_args if Rake::Win32.windows?
+ return exe_args if Rake::Win32.windows? || wsl?
executable = exe_args.shift
found = Which.which(executable) || executable
exe_args.unshift('mono', found)
+ end
+
+ private
+
+ def wsl?
+ File.readable?('/proc/version') && \
+ File.read('/proc/version').include?('Microsoft')
end
end
end
end
end