refactor(deployment): improve environment variable handling in ApplicationDeploymentJob
This commit is contained in:
parent
320a7c97f9
commit
d81ed86920
1 changed files with 2 additions and 2 deletions
|
|
@ -1332,8 +1332,8 @@ private function php_finetunes(&$parsed)
|
||||||
$variables = data_get($parsed, 'variables', []);
|
$variables = data_get($parsed, 'variables', []);
|
||||||
|
|
||||||
$envCommands = [];
|
$envCommands = [];
|
||||||
foreach ($variables as $key => $value) {
|
foreach (array_keys($variables) as $key) {
|
||||||
$envCommands[] = "echo \"$key=\${$key}\" >> /app/.env";
|
$envCommands[] = "printf '%s=%s\\n' ".escapeshellarg($key)." \"\${$key}\" >> /app/.env";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($envCommands)) {
|
if (! empty($envCommands)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue