summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-09 07:45:02 -0700
committerSimon Glass <sjg@chromium.org>2020-11-30 13:14:43 -0700
commitf31e83d6cf44fccd25be48b67dd69aaff6c5e1f4 (patch)
treea9581b54efbf7749370fcf7a6bd9ff863a98e43b /tools
parent0719bf42931033c3109ecc6357e8adb567cb637b (diff)
binman: Handle tool paths containing '~' correctly
At present if CROSS_COMPILE contains a tilde, such as ~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc then binman gives a confusing error: binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ... Fix this by expanding it out before running the tool. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/patman/tools.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index bbb157da87..05b1a1d4b0 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -333,6 +333,7 @@ def Run(name, *args, **kwargs):
elif for_host:
name, extra_args = GetHostCompileTool(name)
args = tuple(extra_args) + args
+ name = os.path.expanduser(name) # Expand paths containing ~
all_args = (name,) + args
result = command.RunPipe([all_args], capture=True, capture_stderr=True,
env=env, raise_on_error=False, binary=binary)