diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index 10688e84d..1e6b9dcbc 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -1186,6 +1186,9 @@ end_execution_reason_t parse_execution_context_t::run_1_job(tnode_t job_ return *ret; } + // We definitely do not want to execute anything if we're told we're --no-execute! + if (no_exec()) return end_execution_reason_t::ok; + // Get terminal modes. struct termios tmodes = {}; if (parser->is_interactive() && tcgetattr(STDIN_FILENO, &tmodes)) {