diff options
author | Chet Ramey <chet.ramey@case.edu> | 2012-03-13 15:12:07 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2012-03-13 15:12:07 -0400 |
commit | 98043138fc04542cf96d54c778949aa92cd505bd (patch) | |
tree | 0deb3d2c6751a0ad7d3aa2a9c61be90e9744a3eb | |
parent | ea6616c01e453e5536308bf32fc37598f9c06950 (diff) | |
download | android_external_bash-98043138fc04542cf96d54c778949aa92cd505bd.tar.gz android_external_bash-98043138fc04542cf96d54c778949aa92cd505bd.tar.bz2 android_external_bash-98043138fc04542cf96d54c778949aa92cd505bd.zip |
Bash-4.2 patch 23
-rw-r--r-- | error.c | 6 | ||||
-rw-r--r-- | patchlevel.h | 2 | ||||
-rw-r--r-- | subst.c | 1 |
3 files changed, 7 insertions, 2 deletions
@@ -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 diff --git a/patchlevel.h b/patchlevel.h index 9166366..3ef48b5 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -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_ */ @@ -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); |