]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.2 patch 23
authorChet Ramey <chet.ramey@case.edu>
Tue, 13 Mar 2012 19:12:07 +0000 (15:12 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 13 Mar 2012 19:12:07 +0000 (15:12 -0400)
error.c
patchlevel.h
subst.c

diff --git a/error.c b/error.c
index 72da9f54040ea4f5209c25e7fee2e40fdc221bbe..1eac01c4a173820aadcf3a9b0335cf89febde11e 100644 (file)
--- a/error.c
+++ b/error.c
@@ -200,7 +200,11 @@ report_error (format, va_alist)
 
   va_end (args);
   if (exit_immediately_on_error)
-    exit_shell (1);
+    {
+      if (last_command_exit_value == 0)
+       last_command_exit_value = 1;
+      exit_shell (last_command_exit_value);
+    }
 }
 
 void
index 9166366b330ce80e35160f598ce16461798a90c6..3ef48b5ac5c8c6effddcbde8ca5a92b5440d3c69 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 22
+#define PATCHLEVEL 23
 
 #endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index df25f632a9d4bdc0c14f042fa28bef9b6eab5b9e..9feaa9c2baac726a472a90410db271d4e1cf4cac 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -7274,6 +7274,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
     default:
     case '\0':
     bad_substitution:
+      last_command_exit_value = EXECUTION_FAILURE;
       report_error (_("%s: bad substitution"), string ? string : "??");
       FREE (value);
       FREE (temp);