commit:     34dd17d154a4769c30a278f6bc407e8cb27706e9
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 27 21:05:51 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 29 23:03:17 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=34dd17d1

isolated-functions.sh: Output error message for nofatal die.

X-Gentoo-Bug:     573056
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=573056

Signed-off-by: Alexander Berntsen <bernalex <AT> gentoo.org>
Acked-by:      Alexander Berntsen <bernalex <AT> gentoo.org>
Acked-by:      Brian Dolbec       <dolsen <AT> gentoo.org>

 bin/isolated-functions.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 5766921..e320f71 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}/eapi.sh" || exit 1
@@ -124,10 +124,11 @@ die() {
        set +x # tracing only produces useless noise here
        local IFS=$' \t\n'
 
-       if ___eapi_die_can_respect_nonfatal; then
-               if [[ ${1} == -n ]]; then
-                       [[ ${PORTAGE_NONFATAL} == 1 ]] && return 1
-                       shift
+       if ___eapi_die_can_respect_nonfatal && [[ $1 == -n ]]; then
+               shift
+               if [[ ${PORTAGE_NONFATAL} == 1 ]]; then
+                       [[ $# -gt 0 ]] && eerror "$*"
+                       return 1
                fi
        fi
 

Reply via email to