From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AA53515800D for ; Sat, 8 Jul 2023 06:20:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA2A8E07A7; Sat, 8 Jul 2023 06:20:30 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CAB03E07A7 for ; Sat, 8 Jul 2023 06:20:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C9B8F340E12 for ; Sat, 8 Jul 2023 06:20:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3B866AC4 for ; Sat, 8 Jul 2023 06:20:28 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1688797142.c6ee01faaeabcab22b29e8d3f671ba6fd7d00724.ulm@gentoo> Subject: [gentoo-commits] proj/eselect:master commit in: bin/, / X-VCS-Repository: proj/eselect X-VCS-Files: ChangeLog bin/eselect.in X-VCS-Directories: / bin/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: c6ee01faaeabcab22b29e8d3f671ba6fd7d00724 X-VCS-Branch: master Date: Sat, 8 Jul 2023 06:20:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ab50f62c-6860-4324-8fd4-5b452587392e X-Archives-Hash: c18b9820969f86be30feb4ae25504ff8 commit: c6ee01faaeabcab22b29e8d3f671ba6fd7d00724 Author: Ulrich Müller gentoo org> AuthorDate: Sat Jul 8 06:19:02 2023 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sat Jul 8 06:19:02 2023 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=c6ee01fa Avoid subshell on startup * bin/eselect.in (PATH): Avoid subshell. Signed-off-by: Ulrich Müller gentoo.org> ChangeLog | 4 ++++ bin/eselect.in | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 65a49f0..932edc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2023-07-08 Ulrich Müller + + * bin/eselect.in (PATH): Avoid subshell. + 2023-06-12 Ulrich Müller * configure.ac: Update version to 1.4.25. 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