Sha256: 7b3a8c61a36afd77f538a5354ff1e99e7e6f0d330b5793beccc398a84bfdb738

Contents?: true

Size: 615 Bytes

Versions: 6

Compression:

Stored size: 615 Bytes

Contents

module Rake
  module Funnel
    module Support
      class Mono
        class << self
          def invocation(executable, *args)
            exe_args = ([executable] << args).flatten.compact

            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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rake-funnel-0.22.2 lib/rake/funnel/support/mono.rb
rake-funnel-0.22.1 lib/rake/funnel/support/mono.rb
rake-funnel-0.22.0 lib/rake/funnel/support/mono.rb
rake-funnel-0.21.2 lib/rake/funnel/support/mono.rb
rake-funnel-0.21.1 lib/rake/funnel/support/mono.rb
rake-funnel-0.21.0 lib/rake/funnel/support/mono.rb