Sha256: 0eeff8452031da18cc4f147cb7a00c00588692abe71b14f8bf9ceaa054486397

Contents?: true

Size: 646 Bytes

Versions: 3

Compression:

Stored size: 646 Bytes

Contents

# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
rake-funnel-0.24.0 lib/rake/funnel/support/mono.rb
rake-funnel-0.23.0 lib/rake/funnel/support/mono.rb
rake-funnel-0.22.3 lib/rake/funnel/support/mono.rb