aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/eselect.in')
-rwxr-xr-xbin/eselect.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/eselect.in b/bin/eselect.in
index 36581e1..ee26b80 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -62,7 +62,8 @@ umask +rx
# Sanitise PATH: We don't want to execute Portage's internal helpers
# if we're called from an ebuild.
IFS=:
-read -r -d '' -a path < <(printf '%s\0' "${PATH}")
+# Append ${IFS} to prevent any trailing empty field from being dropped
+set -f; path=(${PATH}${IFS}); set +f
for i in "${!path[@]}"; do
[[ ${path[i]} == */portage?(/*)/ebuild-helpers?(/*) ]] && unset "path[i]"
done