On rare occasion, the previously-used execute() would return
empty output, which would cause the path to change, often resulting
in a 'no such file or directory' error.
quiet = True
if cwd and "~/" in cwd:
# replace relative home directory
- cwd = cwd.replace('~', execute('cd ~ && pwd', capture=True, super_quiet=True)[1].rstrip())
+ cwd = cwd.replace('~', os.environ['HOME'])
if not super_quiet:
log.info('>>>>> Executing %s in %s', cmd, cwd if cwd else os.getcwd())
if not check_times: