Skip to content

Commit affcb49

Browse files
committed
rename variable
1 parent bb2eaad commit affcb49

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/node_options.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ PerProcessOptionsParser::PerProcessOptionsParser(
12181218
&PerProcessOptions::run);
12191219
AddOption("--run-from",
12201220
"Run a package.json script in a specific working directory",
1221-
&PerProcessOptions::run_dir);
1221+
&PerProcessOptions::run_from);
12221222
AddOption(
12231223
"--disable-wasm-trap-handler",
12241224
"Disable trap-handler-based WebAssembly bound checks. V8 will insert "

src/node_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class PerProcessOptions : public Options {
327327
bool print_version = false;
328328
std::string experimental_sea_config;
329329
std::string run;
330-
std::string run_dir;
330+
std::string run_from;
331331

332332
#ifdef NODE_HAVE_I18N_SUPPORT
333333
std::string icu_data_dir;

src/node_task_runner.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ void ProcessRunner::OnExit(int64_t exit_status, int term_signal) {
206206

207207
void ProcessRunner::Run() {
208208
// keeps the string alive until destructor
209-
if (!node::per_process::cli_options->run_dir.empty()) {
210-
cwd = node::per_process::cli_options->run_dir;
209+
if (!node::per_process::cli_options->run_from.empty()) {
210+
cwd = node::per_process::cli_options->run_from;
211211
if (!std::filesystem::is_directory(cwd)) {
212212
fprintf(stderr, "Error: %s is not a directory\n", cwd.c_str());
213213
init_result->exit_code_ = ExitCode::kGenericUserError;

0 commit comments

Comments
 (0)