make verbose execute and non verbose execute do the same things
This commit is contained in:
parent
435e027dc3
commit
c122852f09
1 changed files with 3 additions and 3 deletions
|
@ -161,11 +161,11 @@ def safe_mkdir(path):
|
|||
raise
|
||||
|
||||
|
||||
def execute(argv, env=os.environ):
|
||||
def execute(argv, env=os.environ, cwd=None):
|
||||
if is_verbose_mode():
|
||||
print ' '.join(argv)
|
||||
try:
|
||||
output = subprocess.check_output(argv, stderr=subprocess.STDOUT, env=env)
|
||||
output = subprocess.check_output(argv, stderr=subprocess.STDOUT, env=env, cwd=cwd)
|
||||
if is_verbose_mode():
|
||||
print output
|
||||
return output
|
||||
|
@ -183,7 +183,7 @@ def execute_stdout(argv, env=os.environ, cwd=None):
|
|||
print e.output
|
||||
raise e
|
||||
else:
|
||||
execute(argv, env)
|
||||
execute(argv, env, cwd)
|
||||
|
||||
|
||||
def electron_gyp():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue