Ejemplo n.º 1
0
    def run(self, options):
        "Run a command using your application's environment"
        self.read_env(options)

        cmd = ' '.join(options.command)
        p = Process(cmd, stdout=sys.stdout)
        p.wait()
Ejemplo n.º 2
0
    def run(self, options):
        "Run a command using your application's environment"
        self.read_env(options)

        cmd = ' '.join(options.command)
        p = Process(cmd, stdout=sys.stdout)
        p.wait()
Ejemplo n.º 3
0
    def run(self, options):
        "Run a command using your application's environment"
        self.set_env(self.read_env(options))

        cmd = ' '.join(shellquote(arg) for arg in options.command)
        p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
        p.wait()
Ejemplo n.º 4
0
    def run(self, options):
        "Run a command using your application's environment"
        self.set_env(self.read_env(options))

        if compat.ON_WINDOWS:
            # do not quote on Windows, subprocess will handle it for us
            # using the MSFT quoting rules
            cmd = options.command
        else:
            cmd = ' '.join(shellquote(arg) for arg in options.command)

        p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
        p.wait()
Ejemplo n.º 5
0
    def run(self, options):
        "Run a command using your application's environment"
        self.set_env(self.read_env(options))

        if compat.ON_WINDOWS:
            # do not quote on Windows, subprocess will handle it for us
            # using the MSFT quoting rules
            cmd = options.command
        else:
            cmd = ' '.join(shellquote(arg) for arg in options.command)

        p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
        p.wait()
Ejemplo n.º 6
0
def command_run(args):
    procfile_path = _procfile_path(args.app_root, args.procfile)
    os.environ.update(_read_env(procfile_path, args.env))

    if compat.ON_WINDOWS:
        # do not quote on Windows, subprocess will handle it for us
        # using the MSFT quoting rules
        cmd = args.command
    else:
        cmd = ' '.join(compat.shellquote(arg) for arg in args.command)

    p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
    p.wait()
    sys.exit(p.returncode)
Ejemplo n.º 7
0
def command_run(args):
    procfile_path = _procfile_path(args.app_root, args.procfile)
    os.environ.update(_read_env(procfile_path, args.env))

    if compat.ON_WINDOWS:
        # do not quote on Windows, subprocess will handle it for us
        # using the MSFT quoting rules
        cmd = args.command
    else:
        cmd = ' '.join(compat.shellquote(arg) for arg in args.command)

    p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
    p.wait()
    sys.exit(p.returncode)
Ejemplo n.º 8
0
 def test_wait(self):
     proc = Process('echo 123', popen=FakePopen)
     self.assertEqual(FakePopen.WAIT_RESULT, proc.wait())
Ejemplo n.º 9
0
def run(cmd):
    """Run a single command and exit"""
    p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
    p.wait()
    print "finished running %s - returned %s" % (cmd, p.returncode)
Ejemplo n.º 10
0
def run(args):
    read_env(args)

    cmd = ' '.join(args.command)
    p = Process(cmd, stdout=sys.stdout)
    p.wait()
Ejemplo n.º 11
0
def run(cmd):
    """Run a single command and exit"""
    p = Process(cmd, stdout=sys.stdout, stderr=sys.stderr)
    p.wait()
    print "finished running %s - returned %s" % (cmd, p.returncode)