mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Remove git lock before fetching updates
This commit is contained in:
parent
db58202263
commit
db602addc4
@ -27,6 +27,11 @@ class GitManager(DeployConfig):
|
||||
self.execute(f'"{self.git}" fetch {source} {branch}')
|
||||
|
||||
hr1('Pull Repository Branch')
|
||||
# Remove git lock
|
||||
lock_file = './.git/index.lock'
|
||||
if os.path.exists(lock_file):
|
||||
print(f'Lock file {lock_file} exists, removing')
|
||||
os.remove(lock_file)
|
||||
if keep_changes:
|
||||
if self.execute(f'"{self.git}" stash', allow_failure=True):
|
||||
self.execute(f'"{self.git}" pull --ff-only {source} {branch}')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user