diff options
author | Jan Janssen <medhefgo@web.de> | 2023-01-10 15:13:22 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2023-01-11 09:29:41 +0100 |
commit | c8add4c2e8e84a176b11a1ff83a2d319d1738304 (patch) | |
tree | 333c312880354d266f9b1ce3fe233fadb442bb46 /src/ukify | |
parent | 833504f0615d996b0fe323e7edae441c7079727d (diff) | |
download | systemd-c8add4c2e8e84a176b11a1ff83a2d319d1738304.tar.gz |
ukify: Fix tools detection if --tools was not passed
In 789a642738d28cf2a8ad3f65df9c0c136e83af09 llvm-objcopy was given
higher priority over objcopy, but this would only work if --tools was
also passed.
Diffstat (limited to 'src/ukify')
-rwxr-xr-x | src/ukify/ukify.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index 2827eadbb6..296521aa56 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -16,6 +16,7 @@ import os import pathlib import re import shlex +import shutil import subprocess import tempfile import typing @@ -341,7 +342,10 @@ def find_tool(name, fallback=None, opts=None): if tool.exists(): return tool - return fallback or name + if shutil.which(name) is not None: + return name + + return fallback def combine_signatures(pcrsigs): |