From 0f80ab8d5ffdb7f8b9fdc830e28498970f3dcb06 Mon Sep 17 00:00:00 2001 From: xboard Date: Sun, 9 Feb 2025 14:24:49 +0800 Subject: [PATCH] fix(update): fix version fetch logic --- app/Services/UpdateService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Services/UpdateService.php b/app/Services/UpdateService.php index b7ecd5d..eef49e3 100644 --- a/app/Services/UpdateService.php +++ b/app/Services/UpdateService.php @@ -254,6 +254,8 @@ class UpdateService protected function getCurrentCommit(): string { try { + // Ensure git configuration is correct + Process::run(sprintf('git config --global --add safe.directory %s', base_path())); $result = Process::run('git rev-parse HEAD'); $fullHash = trim($result->output()); return $fullHash ? $this->formatCommitHash($fullHash) : 'unknown';