2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#2657] replace ~/ with absolute path

This commit is contained in:
Wlodek Wencel
2022-11-30 12:29:34 +01:00
parent 3aa8c1da5c
commit edaf9ab066

View File

@@ -335,6 +335,9 @@ def execute(cmd, timeout=60, cwd=None, env=None, raise_error=True, dry_run=False
quiet = True
if not super_quiet:
log.info('>>>>> Executing %s in %s', cmd, cwd if cwd else os.getcwd())
if cwd and "~/" in cwd:
# replace relative home directory
cwd = cwd.replace('~', execute('cd ~ && pwd', capture=True, super_quiet=True)[1].rstrip())
if not check_times:
timeout = None
if dry_run: