Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Fix environment variable generation in ApplicationDeploymentJob.php

Andras Bacsaicd7272d00af3
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index db64b65420..3d04be7d36 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -718,10 +718,11 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
if ($env->version === '4.0.0-beta.239') {
$real_value = $env->real_value;
} else {
- $real_value = escapeEnvVariables($env->real_value);
- }
- if ($env->is_literal) {
- $real_value = '\'' . $real_value . '\'';
+ if ($env->is_literal) {
+ $real_value = '\'' . $real_value . '\'';
+ } else {
+ $real_value = escapeEnvVariables($env->real_value);
+ }
}
$envs->push($env->key . '=' . $real_value);
}
@@ -755,8 +756,8 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
} else {
$real_value = escapeEnvVariables($env->real_value);
}
- $envs->push($env->key . '=' . $real_value);
}
+ $envs->push($env->key . '=' . $real_value);
}
// Add PORT if not exists, use the first port as default
if ($this->application->environment_variables->filter(fn ($env) => Str::of($env)->startsWith('PORT'))->isEmpty()) {