mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 04:37:44 +08:00
Fix: Remove .git/HEAD.lock
This commit is contained in:
@@ -51,10 +51,13 @@ class GitManager(DeployConfig):
|
|||||||
|
|
||||||
logger.hr('Pull Repository Branch', 1)
|
logger.hr('Pull Repository Branch', 1)
|
||||||
# Remove git lock
|
# Remove git lock
|
||||||
lock_file = './.git/index.lock'
|
for lock_file in [
|
||||||
if os.path.exists(lock_file):
|
'./.git/index.lock',
|
||||||
logger.info(f'Lock file {lock_file} exists, removing')
|
'./.git/HEAD.lock'
|
||||||
os.remove(lock_file)
|
]:
|
||||||
|
if os.path.exists(lock_file):
|
||||||
|
logger.info(f'Lock file {lock_file} exists, removing')
|
||||||
|
os.remove(lock_file)
|
||||||
if keep_changes:
|
if keep_changes:
|
||||||
if self.execute(f'"{self.git}" stash', allow_failure=True):
|
if self.execute(f'"{self.git}" stash', allow_failure=True):
|
||||||
self.execute(f'"{self.git}" pull --ff-only {source} {branch}')
|
self.execute(f'"{self.git}" pull --ff-only {source} {branch}')
|
||||||
|
|||||||
Reference in New Issue
Block a user