@@ -17,21 +17,21 @@ ProcessRunner::ProcessRunner(std::shared_ptr<InitializationResultImpl> result, |
17 | 17 | std::string_view command, |
18 | 18 | std::string_view path_env_var, |
19 | 19 | const PositionalArgs& positional_args) |
20 | | - : init_result(std::move(result)), |
| 20 | + : init_result_(std::move(result)), |
21 | 21 | package_json_path_(package_json_path), |
22 | 22 | script_name_(script_name), |
23 | 23 | path_env_var_(path_env_var) { |
24 | 24 | memset(&options_, 0, sizeof(uv_process_options_t)); |
25 | 25 |
|
26 | 26 | // Inherit stdin, stdout, and stderr from the parent process. |
27 | 27 | options_.stdio_count = 3; |
28 | | - child_stdio[0].flags = UV_INHERIT_FD; |
29 | | - child_stdio[0].data.fd = 0; |
30 | | - child_stdio[1].flags = UV_INHERIT_FD; |
31 | | - child_stdio[1].data.fd = 1; |
32 | | - child_stdio[2].flags = UV_INHERIT_FD; |
33 | | - child_stdio[2].data.fd = 2; |
34 | | - options_.stdio = child_stdio; |
| 28 | + child_stdio_[0].flags = UV_INHERIT_FD; |
| 29 | + child_stdio_[0].data.fd = 0; |
| 30 | + child_stdio_[1].flags = UV_INHERIT_FD; |
| 31 | + child_stdio_[1].data.fd = 1; |
| 32 | + child_stdio_[2].flags = UV_INHERIT_FD; |
| 33 | + child_stdio_[2].data.fd = 2; |
| 34 | + options_.stdio = child_stdio_; |
35 | 35 | options_.exit_cb = ExitCallback; |
36 | 36 |
|
37 | 37 | #ifdef _WIN32 |
@@ -80,8 +80,8 @@ ProcessRunner::ProcessRunner(std::shared_ptr<InitializationResultImpl> result, |
80 | 80 |
|
81 | 81 | auto argc = command_args_.size(); |
82 | 82 | CHECK_GE(argc, 1); |
83 | | - arg = std::unique_ptr<char*[]>(new char*[argc + 1]); |
84 | | - options_.args = arg.get(); |
| 83 | + arg_ = std::unique_ptr<char*[]>(new char*[argc + 1]); |
| 84 | + options_.args = arg_.get(); |
85 | 85 | for (size_t i = 0; i < argc; ++i) { |
86 | 86 | options_.args[i] = const_cast<char*>(command_args_[i].c_str()); |
87 | 87 | } |
@@ -125,8 +125,8 @@ void ProcessRunner::SetEnvironmentVariables() { |
125 | 125 | env_vars_.push_back("NODE_RUN_PACKAGE_JSON_PATH=" + |
126 | 126 | package_json_path_.string()); |
127 | 127 |
|
128 | | - env = std::unique_ptr<char*[]>(new char*[env_vars_.size() + 1]); |
129 | | - options_.env = env.get(); |
| 128 | + env_ = std::unique_ptr<char*[]>(new char*[env_vars_.size() + 1]); |
| 129 | + options_.env = env_.get(); |
130 | 130 | for (size_t i = 0; i < env_vars_.size(); i++) { |
131 | 131 | options_.env[i] = const_cast<char*>(env_vars_[i].c_str()); |
132 | 132 | } |
@@ -198,16 +198,16 @@ void ProcessRunner::ExitCallback(uv_process_t* handle, |
198 | 198 |
|
199 | 199 | void ProcessRunner::OnExit(int64_t exit_status, int term_signal) { |
200 | 200 | if (exit_status > 0) { |
201 | | - init_result->exit_code_ = ExitCode::kGenericUserError; |
| 201 | + init_result_->exit_code_ = ExitCode::kGenericUserError; |
202 | 202 | } else { |
203 | | - init_result->exit_code_ = ExitCode::kNoFailure; |
| 203 | + init_result_->exit_code_ = ExitCode::kNoFailure; |
204 | 204 | } |
205 | 205 | } |
206 | 206 |
|
207 | 207 | void ProcessRunner::Run() { |
208 | 208 | // keeps the string alive until destructor |
209 | | - cwd = package_json_path_.parent_path().string(); |
210 | | - options_.cwd = cwd.c_str(); |
| 209 | + cwd_ = package_json_path_.parent_path().string(); |
| 210 | + options_.cwd = cwd_.c_str(); |
211 | 211 | if (int r = uv_spawn(loop_, &process_, &options_)) { |
212 | 212 | fprintf(stderr, "Error: %s\n", uv_strerror(r)); |
213 | 213 | } |
|