[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pdf-tools 2a07329 4/6: fix: use POSIX standard builtin to
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pdf-tools 2a07329 4/6: fix: use POSIX standard builtin to search PATH |
Date: |
Fri, 3 Dec 2021 10:58:21 -0500 (EST) |
branch: elpa/pdf-tools
commit 2a07329f7bb753cd31e2f01193eb1c46b4b582f0
Author: Jacob Vallejo <jake@jahkeup.com>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>
fix: use POSIX standard builtin to search PATH
Rather than iterating over paths to find a given executable, use the
POSIX standard builtin `command` [1].
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
Signed-off-by: Jacob Vallejo <jake@jahkeup.com>
---
server/autobuild | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/server/autobuild b/server/autobuild
index 9af5990..7db0f0f 100755
--- a/server/autobuild
+++ b/server/autobuild
@@ -64,16 +64,7 @@ which()
if [ -z "$1" ]; then
return 1
fi
- IFS=:
- for dir in $PATH; do
- if [ -x "$dir/$1" ]; then
- printf "%s" "$dir/$1"
- unset IFS
- return 0
- fi
- done
- unset IFS
- return 1
+ command -v "$1"
}
# Quote $@ for the shell.
- [nongnu] elpa/pdf-tools updated (5f77dae -> a8847b7), ELPA Syncer, 2021/12/03
- [nongnu] elpa/pdf-tools e8efff3 1/6: Update Appveyor configs, ELPA Syncer, 2021/12/03
- [nongnu] elpa/pdf-tools d976e47 5/6: Use theme background for tooltip arrow, ELPA Syncer, 2021/12/03
- [nongnu] elpa/pdf-tools 2a07329 4/6: fix: use POSIX standard builtin to search PATH,
ELPA Syncer <=
- [nongnu] elpa/pdf-tools 8a7804a 3/6: fix: handle alternative paths to sh, ELPA Syncer, 2021/12/03
- [nongnu] elpa/pdf-tools f68899c 2/6: Sanitize buffer name for use as temp file prefix, ELPA Syncer, 2021/12/03
- [nongnu] elpa/pdf-tools a8847b7 6/6: Adapt Emacs' easy-menu change #50, ELPA Syncer, 2021/12/03