From: Anas Nashif Date: Sat, 8 Dec 2012 08:34:11 +0000 (-0800) Subject: applying bash42-023 X-Git-Tag: accepted/trunk/20130318.201842~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8498231d8d1d875c84e47d64aff9349919c902e4;p=platform%2Fupstream%2Fbash.git applying bash42-023 --- diff --git a/error.c b/error.c index 72da9f5..1eac01c 100644 --- 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 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_ */ diff --git a/subst.c b/subst.c index df25f63..9feaa9c 100644 --- 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);