mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 20:17:32 +08:00
fix(update): fix version fetch logic
This commit is contained in:
@@ -254,6 +254,8 @@ class UpdateService
|
|||||||
protected function getCurrentCommit(): string
|
protected function getCurrentCommit(): string
|
||||||
{
|
{
|
||||||
try {
|
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');
|
$result = Process::run('git rev-parse HEAD');
|
||||||
$fullHash = trim($result->output());
|
$fullHash = trim($result->output());
|
||||||
return $fullHash ? $this->formatCommitHash($fullHash) : 'unknown';
|
return $fullHash ? $this->formatCommitHash($fullHash) : 'unknown';
|
||||||
|
|||||||
Reference in New Issue
Block a user