From a3a61dbe55b0f003282e9343cc97d4caede4206a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 4 Sep 2024 14:09:55 +0200 Subject: [PATCH] refactor: Update Docker Compose location handling in PublicGitRepository --- app/Livewire/Project/New/PublicGitRepository.php | 10 ++++++++++ .../project/new/public-git-repository.blade.php | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Project/New/PublicGitRepository.php b/app/Livewire/Project/New/PublicGitRepository.php index b29fe8cab..b5c5cb1db 100644 --- a/app/Livewire/Project/New/PublicGitRepository.php +++ b/app/Livewire/Project/New/PublicGitRepository.php @@ -99,6 +99,16 @@ public function updatedBaseDirectory() } } + public function updatedDockerComposeLocation() + { + if ($this->docker_compose_location) { + $this->docker_compose_location = rtrim($this->docker_compose_location, '/'); + if (! str($this->docker_compose_location)->startsWith('/')) { + $this->docker_compose_location = '/'.$this->docker_compose_location; + } + } + } + public function updatedBuildPack() { if ($this->build_pack === 'nixpacks') { diff --git a/resources/views/livewire/project/new/public-git-repository.blade.php b/resources/views/livewire/project/new/public-git-repository.blade.php index 01cd67575..cef6cffaf 100644 --- a/resources/views/livewire/project/new/public-git-repository.blade.php +++ b/resources/views/livewire/project/new/public-git-repository.blade.php @@ -4,7 +4,7 @@
-
+
@@ -47,7 +47,7 @@ @if ($build_pack === 'dockercompose') - Compose file location in your repository: