mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 19:40:53 +08:00
fix(update): fix version fetch logic
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user