diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2021-11-27 23:03:16 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2021-11-27 23:03:16 +0100 |
commit | 0dd5eaa32909befd7f796ee837b21f4f5a63f3e7 (patch) | |
tree | 870cab322b00c0bc1d7646ab7036989e0747c02e /tests/init.sh | |
parent | 372cd34894e247fe5c2991eb75185ea2ec850ee2 (diff) | |
download | findutils-0dd5eaa32909befd7f796ee837b21f4f5a63f3e7.tar.gz |
maint: update gnulib to latest
Run 'make update-gnulib-to-latest' - thus pulling in 357 commits,
including the following which was also discussed in:
https://savannah.gnu.org/bugs/?60383
> test-framework-sh: remove unsafe entries from PATH
* gnulib: Update to latest.
* cfg.mk (local-checks-to-skip): Add and therefore disable sc_indent
as auto indent is too invasive for now.
* m4/mkinstalldirs.m4: Fix repeated word: s/can can/can/. Reported by
a new rule in sc_prohibit_doubled_word.
* m4/noreturn.m4: Likewise.
* tests/init.sh: Likewise.
Diffstat (limited to 'tests/init.sh')
-rwxr-xr-x | tests/init.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/init.sh b/tests/init.sh index 9ef83488..a975592f 100755 --- a/tests/init.sh +++ b/tests/init.sh @@ -426,6 +426,23 @@ setup_ () for sig_ in 1 2 3 13 15; do eval "trap 'Exit $(expr $sig_ + 128)' $sig_" done + + # Remove relative and non-accessible directories from PATH, including '.' + # and Zero-length entries. + saved_IFS="$IFS" + IFS=: + new_PATH= + sep_= + for dir in $PATH; do + case "$dir" in + /*) test -d "$dir/." || continue + new_PATH="${new_PATH}${sep_}${dir}" + sep_=':';; + esac + done + IFS="$saved_IFS" + PATH="$new_PATH" + export PATH } # This is a stub function that is run upon trap (upon regular exit and |