show the cwd for commands before running them
If the caller passes a cwd value, display it before showing the command and running it. Change-Id: I3f50da28f660dcb0ef9f52b707079ed24ca89ce2 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
f942b9e076
commit
5420e23870
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user