diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 8e5b32d1c..4a849fccb 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -1905,7 +1905,7 @@ private function check_git_if_build_needed() $output = $lsRemoteOutput->value(); // Extract the line with the tab (actual ls-remote result) - preg_match('/([0-9a-f]{40})\s*\t/', $output, $matches); + preg_match('/\b([0-9a-fA-F]{40})(?=\s*\t)/', $output, $matches); if (isset($matches[1])) { $this->commit = $matches[1];