commit:     9869b3f98c95ec154b7ac5b2af8bcf6201d8127a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  7 08:50:02 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 08:50:02 2023 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=9869b3f9

Use printf instead of echo

* bin/eselect.in (PATH): Use printf instead of echo

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog      | 2 ++
 bin/eselect.in | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index aba58d1..87efe93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2023-06-07  Ulrich Müller  <u...@gentoo.org>
 
+       * bin/eselect.in (PATH): Use printf instead of echo.
+
        * configure.ac: Update version to 1.4.24.
        * Tagged 1.4.24 release.
 

diff --git a/bin/eselect.in b/bin/eselect.in
index 41d53d7..36581e1 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -62,7 +62,7 @@ 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 < <(echo -n "${PATH}")
+read -r -d '' -a path < <(printf '%s\0' "${PATH}")
 for i in "${!path[@]}"; do
        [[ ${path[i]} == */portage?(/*)/ebuild-helpers?(/*) ]] && unset 
"path[i]"
 done

Reply via email to