commit:     62501cdddf09cd92689fb5e8f87c4369fd636cf5
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  8 20:53:12 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Jan  8 20:53:12 2022 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=62501cdd

Error out if --root has no option argument

* bin/eselect.in: Error out if --root has no option argument.

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

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

diff --git a/ChangeLog b/ChangeLog
index d40ac8d..ac7c78b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2022-01-08  Ulrich Müller  <u...@gentoo.org>
 
+       * bin/eselect.in: Error out if --root has no option argument.
+
        * configure.ac: Update version to 1.4.19.
        * Tagged 1.4.19 release.
 

diff --git a/bin/eselect.in b/bin/eselect.in
index 3422197..4caa87e 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -150,6 +150,7 @@ while [[ ${1##--} != "$1" ]]; do
                        action=${1##--}
                        ;;
                root=*|root)
+                       [[ ${1#*=} == "$1" ]] && die -q "Option $1 requires an 
argument"
                        # set ROOT and recalculate EROOT
                        ROOT=${1#*=}
                        EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}"

Reply via email to