From 2b1e35980f83e22fa0306a48d7e1d4adc4ffe981 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 16 Jan 2024 15:26:44 +0100 Subject: [PATCH] empty nixpacks type result in error --- app/Jobs/ApplicationDeploymentJob.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 16ff244c2..3ebe7f578 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -265,13 +265,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", @@ -889,6 +889,9 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted ); if ($this->saved_outputs->get('nixpacks_type')) { $this->nixpacks_type = $this->saved_outputs->get('nixpacks_type'); + if (str($this->nixpacks_type)->isEmpty()) { + throw new RuntimeException('Nixpacks failed to detect the application type. Please check the documentation of Nixpacks: https://nixpacks.com/docs/providers'); + } } if ($this->saved_outputs->get('nixpacks_plan')) { $this->nixpacks_plan = $this->saved_outputs->get('nixpacks_plan');