diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-31 15:57:08 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-31 15:57:08 -0800 |
commit | ad8d68dd4390753901b5e1dae4b4c4b44be7fcea (patch) | |
tree | 5b8f5e3ca3d698dd7ae764f2833ab7b91726fd93 /expand.cpp | |
parent | 0db1b6ce44b2dcae94a4d33c04b606ef819bb78b (diff) |
Make subcommands modify $status, and make builtin_set not modify status unless it fails
https://github.com/fish-shell/fish-shell/issues/547
https://github.com/fish-shell/fish-shell/issues/214
Diffstat (limited to 'expand.cpp')
-rw-r--r-- | expand.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1352,7 +1352,7 @@ static int expand_cmdsubst(parser_t &parser, const wcstring &input, std::vector< const wcstring subcmd(paran_begin + 1, paran_end-paran_begin - 1); - if (exec_subshell(subcmd, sub_res) == -1) + if (exec_subshell(subcmd, sub_res, true /* do apply exit status */) == -1) { parser.error(CMDSUBST_ERROR, -1, L"Unknown error while evaulating command substitution"); return 0; |