From fba4363c1d1f311ff0829c270d1fdb99e84ae1aa Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 17 Feb 2020 14:21:43 +0100 Subject: [PATCH] Stop fish --no-execute harder from executing stuff I'm not quite sure what it executed - I think it's just constructing jobs and stuff, but it did show up in the profile - 21% spent on "job_reap". --- src/parse_execution.cpp | 3 +++ 1 file changed, 3 insertions(+) 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)) {