Exemple #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()
Exemple #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()
Exemple #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()
Exemple #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()
Exemple #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()
Exemple #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)
Exemple #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)
Exemple #8
0
 def test_wait(self):
     proc = Process('echo 123', popen=FakePopen)
     self.assertEqual(FakePopen.WAIT_RESULT, proc.wait())
Exemple #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)
Exemple #10
0
def run(args):
    read_env(args)

    cmd = ' '.join(args.command)
    p = Process(cmd, stdout=sys.stdout)
    p.wait()
Exemple #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)