+5
-4
lines changedFilter options
+5
-4
lines changed Original file line number Diff line number Diff line change
@@ -65,18 +65,19 @@ std::vector<Dotenv::env_file_data> Dotenv::GetDataFromArgs(
65
65
}
66
66
67
67
Maybe<void> Dotenv::SetEnvironment(node::Environment* env) {
68
-
Local<Value> name;
69
-
Local<Value> val;
70
68
auto context = env->context();
69
+
auto env_vars = env->env_vars();
71
70
72
71
for (const auto& entry : store_) {
73
-
auto existing = env->env_vars()->Get(entry.first.data());
72
+
auto existing = env_vars->Get(entry.first.data());
74
73
if (!existing.has_value()) {
74
+
Local<Value> name;
75
+
Local<Value> val;
75
76
if (!ToV8Value(context, entry.first).ToLocal(&name) ||
76
77
!ToV8Value(context, entry.second).ToLocal(&val)) {
77
78
return Nothing<void>();
78
79
}
79
-
env->env_vars()->Set(env->isolate(), name.As<String>(), val.As<String>());
80
+
env_vars->Set(env->isolate(), name.As<String>(), val.As<String>());
80
81
}
81
82
}
82
83
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4