summaryrefslogtreecommitdiff
path: root/include/init.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-20 02:58:33 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-20 02:58:33 +0100
commitfb7aaa78bb080a473bdf0edf449bf08045e8366c (patch)
treef54c00972bd34b0277841ee0cea4bf4d1e93d2d3 /include/init.sh
parent903f78bf080ee8ad9176022005b81a3d3ac530b3 (diff)
vendor.sh: optimise find_me()HEADmaster
i'm adding characters to 7ztest, which isn't being passed on through because everything runs in subshells; the next pass would default back to the original string, so a given file may be checked multiple times. fix this by mitigation; use the random string from mktemp as a suffix instead. in practice, this has not affected performance much, but it will nevertheless avoid unnecessary work by xbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/init.sh')
-rw-r--r--include/init.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/init.sh b/include/init.sh
index 38eb1c81..39d48948 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -181,7 +181,7 @@ pybin()
[ $venv -gt 0 ] && for pypath in "/usr/local/bin" "/usr/bin"; do
[ -e "$pypath/$1" ] && [ ! -d "$pypath/$1" ] && \
[ -x "$pypath/$1" ] && printf "%s/%s\n" "$pypath" "$1" && \
- return 0
+ return 0; :
done && return 1
# Defer to normal command -v if not a venv