mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-20 14:11:14 -03:00
another step in fixing issue #3985
This primarily replaces "STATUS_BUILTIN_OK" with "STATUS_CMD_OK" and "STATUS_BUILTIN_ERROR" with "STATUS_CMD_ERROR". That is because we want to make it clear these status codes are applicable to fish functions as well as builtins. Future changes will make it easier to use these symbols and values in functions.
This commit is contained in:
@@ -302,7 +302,7 @@ parse_execution_result_t parse_execution_context_t::run_if_statement(
|
||||
} else if (else_clause->child_count == 0) {
|
||||
// 'if' condition failed, no else clause, return 0, we're done.
|
||||
job_list_to_execute = NULL;
|
||||
proc_set_last_status(STATUS_BUILTIN_OK);
|
||||
proc_set_last_status(STATUS_CMD_OK);
|
||||
break;
|
||||
} else {
|
||||
// We have an 'else continuation' (either else-if or else).
|
||||
@@ -325,7 +325,7 @@ parse_execution_result_t parse_execution_context_t::run_if_statement(
|
||||
run_job_list(*job_list_to_execute, ib);
|
||||
} else {
|
||||
// No job list means no sucessful conditions, so return 0 (issue #1443).
|
||||
proc_set_last_status(STATUS_BUILTIN_OK);
|
||||
proc_set_last_status(STATUS_CMD_OK);
|
||||
}
|
||||
|
||||
// It's possible there's a last-minute cancellation (issue #1297).
|
||||
@@ -797,7 +797,7 @@ parse_execution_result_t parse_execution_context_t::handle_command_not_found(
|
||||
}
|
||||
|
||||
// Set the last proc status appropriately.
|
||||
proc_set_last_status(err_code == ENOENT ? STATUS_UNKNOWN_COMMAND : STATUS_NOT_EXECUTABLE);
|
||||
proc_set_last_status(err_code == ENOENT ? STATUS_CMD_UNKNOWN : STATUS_NOT_EXECUTABLE);
|
||||
|
||||
return parse_execution_errored;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user