diff --git a/src/builtin.cpp b/src/builtin.cpp index 3cecad83b..80c29895f 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -158,7 +158,7 @@ void builtin_print_help(parser_t &parser, const io_streams_t &streams, const wch ios.push_back(std::make_shared(STDOUT_FILENO, STDERR_FILENO)); } auto res = parser.eval(cmd, ios); - if (res.status.exit_code() == 2) { + if (res.status.normal_exited() && res.status.exit_code() == 2) { streams.err.append_format(BUILTIN_ERR_MISSING_HELP, name_esc.c_str(), name_esc.c_str()); } }