Bash-4.2 patch 23

This commit is contained in:
Chet Ramey 2012-03-13 15:12:07 -04:00
commit 98043138fc
3 changed files with 7 additions and 2 deletions

View file

@ -200,7 +200,11 @@ report_error (format, va_alist)
va_end (args); va_end (args);
if (exit_immediately_on_error) 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 void

View file

@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */ looks for to find the patch level (for the sccs version string). */
#define PATCHLEVEL 22 #define PATCHLEVEL 23
#endif /* _PATCHLEVEL_H_ */ #endif /* _PATCHLEVEL_H_ */

View file

@ -7274,6 +7274,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
default: default:
case '\0': case '\0':
bad_substitution: bad_substitution:
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("%s: bad substitution"), string ? string : "??"); report_error (_("%s: bad substitution"), string ? string : "??");
FREE (value); FREE (value);
FREE (temp); FREE (temp);