Run the command.

 @param  [String] command_line
         THe command line to execute

 @return [[String, Process::Status]]
         The output, which is emitted during execution, and the exit status.
513400
def run(command_line)
      require 'open3'
      env = Hash[environment_vars.map { |k, v| [k.to_s, v.to_s] }]
      Open3.capture2e(env, command_line.to_s)
    end
1117049
def run_command=(command)
      raise JSS::InvalidDataError, 'Command to run must be a String' unless command.is_a? String
      @files_processes[:run_command] = command
      @need_to_update = true
    end
592571
def run(command, **kwargs):
  
  print command
  p = Popen(shlex.split(command), **kwargs)
  p.wait()

  return p.returncode
701488
def _run(self, cmd):
        '''
        
        '''

        if isinstance(cmd, six.string_types):
            cmd = salt.utils.args.shlex_split(cmd)

        try:
            log.debug(cmd)
            p = subprocess.Popen(
                cmd,
                shell=True,
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE)
            return p.communicate()

        except (OSError, IOError) as exc:
            log.debug('Command Failed: %s', ' '.join(cmd))
            log.debug('Error: %s', exc)
            raise CommandExecutionError(exc)
77915
def run(*args, &block)
      return Open3.popen3(*args, &block) if block_given?
      Open3.popen3(*args)
    end
1041232
def execute(self, arg_list):
        
        arg_map = self.parser.parse_args(arg_list).__dict__
        command = arg_map.pop(self._COMMAND_FLAG)
        return command(**arg_map)
598769
def runcmd
      @success = false
      @success = run
      logger.debug(@lastcall.inspect) unless @lastcall.nil? if logger
      logger.debug(@result) unless @result.nil? if logger
      @success
    end
721801
def run(command, get_output=False, cwd=None):
    
    if cwd is None:
        cwd = GITPATH

    cprint('===')
    cprint('===  Command: ', command)
    cprint('===  CWD:     ', cwd)
    cprint('===')

    if get_output:
        proc = capture_stdout(command, cwd=cwd)
        out = proc.stdout.read().decode()
        print(out, end='')
        check_exit_code(proc.returncode)
        return out
    else:
        proc = sarge_run(command, cwd=cwd)
        check_exit_code(proc.returncode)
1361457
def run(args = {})
      @at_stop = []

      extra_options = parse_cli_options!(args)

      # Boot app first, 'cause it might change
      # configuration, loggin settings, etc.
      boot_app!

      parse_gem_options!(extra_options)

      configure_server!

      logger.info "Starting AnyCable gRPC server (pid: #{Process.pid})"

      print_versions!

      logger.info "Serving #{defined?(::Rails) ? 'Rails ' : ''}application from #{boot_file}"

      verify_connection_factory!

      log_grpc! if config.log_grpc

      log_errors!

      @server = AnyCable::Server.new(
        host: config.rpc_host,
        **config.to_grpc_params,
        interceptors: AnyCable.middleware.to_a
      )

      # Make sure middlewares are not adding after server has started
      AnyCable.middleware.freeze

      start_health_server! if config.http_health_port_provided?
      start_pubsub!

      server.start

      run_custom_server_command! unless server_command.nil?

      begin
        wait_till_terminated
      rescue Interrupt => e
        logger.info "Stopping... #{e.message}"

        shutdown

        logger.info "Stopped. Good-bye!"
        exit(0)
      end
    end
844948
def run(args: List[str],
        get_output: bool = False,
        encoding: str = sys.getdefaultencoding()) -> Tuple[str, str]:
    
    printable = " ".join(shlex.quote(x) for x in args).replace("\n", r"\n")
    log.debug("Running external command: {}", printable)
    if get_output:
        p = subprocess.run(args, stdout=subprocess.PIPE,
                           stderr=subprocess.PIPE, check=True)
        stdout, stderr = p.stdout.decode(encoding), p.stderr.decode(encoding)
    else:
        subprocess.check_call(args)
        stdout, stderr = "", ""
    return stdout, stderr
801514
def run(klass, method)
      # Get the command info for this method on this klass
      command_info_module = klass::CommandInfo.const_get(camelize(method))

      # If seeking help for this command with --help or -h
      if seeking_command_help?(@current_args)
        puts "\nPurpose: #{command_description(command_info_module)}\n"

        # respond with command-specific help
        respond_with_command_help(command_info_module)
        return
      end

      # get the valid arguments defined for this comand
      valid_args = command_valid_args(command_info_module)

      if !valid_args?(valid_args)
        handle_invalid_args(command_info_module)
        return
      end

      klass.new(@current_args.dup).send(method)
    end
1244525
def run(*args)
      stdin = nil
      cmd = SysCmd.command name do
        args.each do |arg|
          case arg
          when Hash
            arg.each do |key, value|
              next if value.nil?
              case value
              when Array
                value = value*","
              when String
                if value.include?("\n")
                  raise "Cannot pass multiple options through STDIN" if stdin
                  stdin = Support.unindent(value)
                  value = "-"
                  input stdin
                end
              end
              option key.to_s, equal_value: value
            end
          else
            option arg
          end
        end
      end
      if @context
        @context.execute cmd
      end
      cmd
    end
576593
def runCommand(cmd, timeout=None, window=None):
    
    p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    output = ''
    for line in p.stdout:
        line = line.decode(errors='replace' if (sys.version_info) < (3, 5) else 'backslashreplace').rstrip()
        output += line
        print(line)
        window.Refresh() if window else None        # yes, a 1-line if, so shoot me

    retval = p.wait(timeout)
    return (retval, output)
320233
def run(command, *args)
      receive_loop # start the loop

      send_args     args.flatten
      send_env      opts[:env]
      send_dir      opts[:dir]
      send_command  command
      send_stdin    opts[:stdin]

      receive_loop.join
      return nil
    end
942066
def run(self):
    
    self.parser = MultioptOptionParser(
      usage="%prog <command> [options] [args]",
      prog=self.clsname,
      version=self.version,
      option_list=self.global_options,
      description=self.desc_short,
      commands=self.command_set,
      epilog=self.footer
    )
    
    try:
      self.options, self.args = self.parser.parse_args(self.argv)    
    except Exception, e:
      print str(e)
      pass

    if len(self.args) < 1:
      self.parser.print_lax_help()
      return 2
    
    self.command = self.args.pop(0)
    showHelp = False
    
    if self.command == 'help': 
      if len(self.args) < 1:
        self.parser.print_lax_help()
        return 2
      else:
        self.command = self.args.pop()
        showHelp = True

    if self.command not in self.valid_commands:
      self.parser.print_cmd_error(self.command)
      return 2

    self.command_set[self.command].set_cmdname(self.command)
    subcmd_parser = self.command_set[self.command].get_parser(self.clsname, self.version, self.global_options)
    subcmd_options, subcmd_args = subcmd_parser.parse_args(self.args)

    if showHelp:
      subcmd_parser.print_help_long()
      return 1

    try:
      self.command_set[self.command].func(subcmd_options, *subcmd_args)
    except (CommandError, TypeError), e:
      # self.parser.print_exec_error(self.command, str(e))
      subcmd_parser.print_exec_error(self.command, str(e))
      print 
      # @TODO show command help
      # self.parser.print_lax_help()
      return 2

      
    return 1
355453
def run(cmd_type, command = nil, options = {}, &block)
      command        = cmd_type.to_s if command.nil?
      heroku_options = (options.delete(:heroku) || {}).map do |k,v|
        arg = "--#{k.to_s.shellescape}"
        arg << "=#{v.to_s.shellescape}" unless v.nil?
        arg
      end.join(" ")
      heroku_command = "heroku run -a #{name} #{heroku_options} --exit-code -- #{command}"
      bundle_exec do
        if block_given?
          ReplRunner.new(cmd_type, heroku_command, options).run(&block)
        else
          `#{heroku_command}`
        end
      end
    end
1247768
def run_command(cmd, redirect_output=True, check_exit_code=True):
    
    if redirect_output:
        stdout = subprocess.PIPE
    else:
        stdout = None
    proc = subprocess.Popen(cmd, cwd=ROOT, stdout=stdout)
    output = proc.communicate()[0]
    if check_exit_code and proc.returncode != 0:
        raise Exception('Command "%s" failed.\n%s' % (' '.join(cmd), output))
    return output