Skip to content

Commit

Permalink
fix(update): fix version fetch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
xboard committed Feb 9, 2025
1 parent 7ac2e2e commit 0f80ab8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Services/UpdateService.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ public function executeUpdate(): array
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';
Expand Down

0 comments on commit 0f80ab8

Please sign in to comment.