diff --git a/src/node.cc b/src/node.cc index 07a91f485502b8..fb0f643fe50b6c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1058,6 +1058,13 @@ InitializeOncePerProcessInternal(const std::vector& args, } } + if (args.size() >= 2 && args.at(1) == "run") { + printf("This is a reserved command. Please run \"node run.js\" instead.\n"); + result->exit_code_ = ExitCode::kGenericUserError; + result->early_return_ = true; + return result; + } + if (!(flags & ProcessInitializationFlags::kNoPrintHelpOrVersionOutput)) { if (per_process::cli_options->print_version) { printf("%s\n", NODE_VERSION);