ukify: Fix tools detection if --tools was not passed

In 789a642738 llvm-objcopy was given
higher priority over objcopy, but this would only work if --tools was
also passed.
This commit is contained in:
Jan Janssen 2023-01-10 15:13:22 +01:00
parent 833504f061
commit c8add4c2e8

View file

@ -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):