From f9aa029e8eb20a5c2279b47068d7a949c698a160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C5=A0tefanko?= Date: Sat, 20 Apr 2024 00:10:50 +0200 Subject: [PATCH] Added " " to encapsulate branch name when cloning --- app/Models/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Application.php b/app/Models/Application.php index 66e18565b..971f1e894 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -579,9 +579,9 @@ function generateGitImportCommands(string $deployment_uuid, int $pull_request_id ['repository' => $customRepository, 'port' => $customPort] = $this->customRepository(); $baseDir = $custom_base_dir ?? $this->generateBaseDir($deployment_uuid); $commands = collect([]); - $git_clone_command = "git clone -b {$this->git_branch}"; + $git_clone_command = "git clone -b \"{$this->git_branch}\""; if ($only_checkout) { - $git_clone_command = "git clone --no-checkout -b {$this->git_branch}"; + $git_clone_command = "git clone --no-checkout -b \"{$this->git_branch}\""; } if ($pull_request_id !== 0) { $pr_branch_name = "pr-{$pull_request_id}-coolify";