When PATH is defined, only locations from variable

This commit is contained in:
Michael Boelen 2019-07-01 07:39:32 +02:00
parent 76c3ea0edb
commit bc88775d0e
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@
# multiple times, the one first in PATH should be used.
if [ ! -z "${PATH}" ]; then
PATH_REVERSED=$(echo ${PATH} | awk -F: '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }')
BIN_PATHS=$(echo "${PATH_REVERSED} ${BIN_PATHS}" | tr ':' ' ')
BIN_PATHS=$(echo "${PATH_REVERSED}" | tr ':' ' ')
fi
# First test available locations that may be suspicious or dangerous