mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-21 15:01:16 -03:00
Clean up the return type of parser_t::eval
parser_t::eval indicates whether there was a parse error. It can be easily confused with the status of the execution. Use a real type to make it more clear.
This commit is contained in:
@@ -1183,7 +1183,7 @@ static int exec_subshell_internal(const wcstring &cmd, parser_t &parser, wcstrin
|
||||
// be null.
|
||||
std::shared_ptr<io_buffer_t> buffer;
|
||||
if (auto bufferfill = io_bufferfill_t::create(fd_set_t{}, ld.read_limit)) {
|
||||
if (parser.eval(cmd, io_chain_t{bufferfill}, SUBST) == 0) {
|
||||
if (parser.eval(cmd, io_chain_t{bufferfill}, SUBST) == eval_result_t::ok) {
|
||||
subcommand_statuses = parser.get_last_statuses();
|
||||
}
|
||||
buffer = io_bufferfill_t::finish(std::move(bufferfill));
|
||||
|
||||
Reference in New Issue
Block a user