Use a POSIX compatible built-in to detect the presence of flatpak-spawn
... because it's both faster and more portable than which(1). Detected by https://www.shellcheck.net/. Note that the checkbashisms [1] tool thinks that only 'command -p ...' is specified in POSIX, but that's not true [2]. [1] https://packages.debian.org/sid/devscripts [2] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
This commit is contained in:
parent
0152317522
commit
6a5b41835e
1 changed files with 1 additions and 1 deletions
2
toolbox
2
toolbox
|
@ -1006,7 +1006,7 @@ while has_prefix "$1" -; do
|
|||
done
|
||||
|
||||
if [ -f /run/.containerenv ] 2>&3; then
|
||||
if ! which flatpak-spawn >/dev/null 2>&3; then
|
||||
if ! command -v flatpak-spawn >/dev/null 2>&3; then
|
||||
echo "$base_toolbox_command: flatpak-spawn not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue