fix(docker): ensure correct parsing of environment variables by limiting explode to 2 parts

This commit is contained in:
Andras Bacsai
2025-05-22 14:27:55 +02:00
parent e9dd170ffb
commit 698b090b4d

View File

@@ -99,7 +99,7 @@ function format_docker_envs_to_json($rawOutput)
$outputLines = json_decode($rawOutput, true, flags: JSON_THROW_ON_ERROR); $outputLines = json_decode($rawOutput, true, flags: JSON_THROW_ON_ERROR);
return collect(data_get($outputLines[0], 'Config.Env', []))->mapWithKeys(function ($env) { return collect(data_get($outputLines[0], 'Config.Env', []))->mapWithKeys(function ($env) {
$env = explode('=', $env); $env = explode('=', $env, 2);
return [$env[0] => $env[1]]; return [$env[0] => $env[1]];
}); });