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: empty build variables

Andras Bacsai126ac354d57a
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index aa68c20adc..2dafcee434 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -279,13 +279,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
} else {
$this->write_deployment_configurations();
}
- $this->execute_remote_command(
- [
- "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1",
- "hidden" => true,
- "ignore_errors" => true,
- ]
- );
+ // $this->execute_remote_command(
+ // [
+ // "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1",
+ // "hidden" => true,
+ // "ignore_errors" => true,
+ // ]
+ // );
$this->execute_remote_command(
[
"docker image prune -f >/dev/null 2>&1",
@@ -1022,11 +1022,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->env_nixpacks_args = collect([]);
if ($this->pull_request_id === 0) {
foreach ($this->application->nixpacks_environment_variables as $env) {
- $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
+ if (!is_null($env->real_value)) {
+ $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
+ }
}
} else {
foreach ($this->application->nixpacks_environment_variables_preview as $env) {
- $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
+ if (!is_null($env->real_value)) {
+ $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}");
+ }
}
}
@@ -1037,11 +1041,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
$this->env_args = collect([]);
if ($this->pull_request_id === 0) {
foreach ($this->application->build_environment_variables as $env) {
- $this->env_args->put($env->key, $env->real_value);
+ if (!is_null($env->real_value)) {
+ $this->env_args->put($env->key, $env->real_value);
+ }
}
} else {
foreach ($this->application->build_environment_variables_preview as $env) {
- $this->env_args->put($env->key, $env->real_value);
+ if (!is_null($env->real_value)) {
+ $this->env_args->put($env->key, $env->real_value);
+ }
}
}
$this->env_args->put('SOURCE_COMMIT', $this->commit);