# File lib/execjs/external_runtime.rb, line 144
      def which(command)
        Array(command).each do |name|
          name, args = name.split(/\s+/, 2)
          result = if ExecJS.windows?
            `#{shell_escape("#{ExecJS.root}/support/which.bat", name)}`
          else
            `#{shell_escape('command', '-v', name)} 2>/dev/null`
          end

          if path = result.strip.split("\n").first
            return args ? "#{path} #{args}" : path
          end
        end
        nil
      end