Merge "show the cwd for commands before running them"

This commit is contained in:
Zuul 2018-03-21 10:12:39 +00:00 committed by Gerrit Code Review
commit 5b0d917cd1

View File

@ -38,6 +38,8 @@ def check_call(*popenargs, timeout=None, **kwargs):
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
if 'cwd' in kwargs:
LOG.debug('cwd = {}'.format(kwargs['cwd']))
LOG.debug('$ {}'.format(' '.join(cmd)))
completed = subprocess.run(*popenargs, **kwargs)
@ -65,6 +67,8 @@ def check_output(*popenargs, timeout=None, **kwargs):
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
if 'cwd' in kwargs:
LOG.debug('cwd = {}'.format(kwargs['cwd']))
LOG.debug('$ {}'.format(' '.join(cmd)))
if 'stderr' not in kwargs: