mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fix environment not being inherited in debuggee.
This commit is contained in:
@@ -1279,6 +1279,8 @@ void DebuggerPlugin::replaceKeysInJson(
|
||||
return true;
|
||||
};
|
||||
|
||||
std::vector<std::string> keysToRemove;
|
||||
|
||||
for ( auto& j : json ) {
|
||||
if ( j.is_object() ) {
|
||||
replaceKeysInJson( j, randomPort, solvedInputs );
|
||||
@@ -1303,9 +1305,13 @@ void DebuggerPlugin::replaceKeysInJson(
|
||||
j = std::move( argsArr );
|
||||
continue;
|
||||
} else if ( runConfig && val == KEY_ENV && buildConfig ) {
|
||||
j = nlohmann::json::object();
|
||||
for ( const auto& env : buildConfig->envs() )
|
||||
j[env.first] = env.second;
|
||||
if ( !buildConfig->envs().empty() ) {
|
||||
j = nlohmann::json::object();
|
||||
for ( const auto& env : buildConfig->envs() )
|
||||
j[env.first] = env.second;
|
||||
} else {
|
||||
keysToRemove.push_back( "env" );
|
||||
}
|
||||
} else if ( val == KEY_STOPONENTRY ) {
|
||||
j = false;
|
||||
} else {
|
||||
@@ -1329,6 +1335,10 @@ void DebuggerPlugin::replaceKeysInJson(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( const auto& key : keysToRemove ) {
|
||||
json.erase( key );
|
||||
}
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, DapConfigurationInput>
|
||||
|
||||
Reference in New Issue
Block a user