diff options
author | 2014-02-07 17:56:40 -0800 | |
---|---|---|
committer | 2014-02-07 17:57:53 -0800 | |
commit | e632d39b1f627773b29f7934d7d79545af75e47f (patch) | |
tree | 2222b1a5364128f8e7812ecbbc33f310ba59c6dd /builtin.cpp | |
parent | 09054a09fa8aef98229ea132f9043ead7f7e1e0e (diff) |
Make if statements always return success at the end, matching other
shells. Fixes #1061.
Diffstat (limited to 'builtin.cpp')
-rw-r--r-- | builtin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin.cpp b/builtin.cpp index 81738ffb..fb5fbeb4 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -3773,6 +3773,10 @@ static int builtin_end(parser_t &parser, wchar_t **argv) } case IF: + /* Always return success (#1061) */ + proc_set_last_status(0); + break; + case SUBST: case BEGIN: case SWITCH: |