summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-04-18 08:49:13 +0200
committerache <ache@ache.one>2023-04-18 08:49:13 +0200
commitfcb248ed7ab2d7e5741c297f21782bc6d51cd266 (patch)
treefd6812b2e43122e02a86e706b23d10e23aa07d8d
parentEnforce the use of ruff (diff)
Get repo name when fail to update a repo
-rwxr-xr-xpack/ache/start/updatePlugin.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/pack/ache/start/updatePlugin.py b/pack/ache/start/updatePlugin.py
index 21f9d7e..2a8a496 100755
--- a/pack/ache/start/updatePlugin.py
+++ b/pack/ache/start/updatePlugin.py
@@ -6,17 +6,23 @@ from pathlib import Path
for plugin in Path('.').iterdir():
if (plugin / ".git").exists():
- subprocess.run(["git", "pull"], cwd=str(plugin))
+ ret = subprocess.run(["git", "pull"], cwd=str(plugin))
+
+ if ret.returncode != 0:
+ print(f"Error updating {plugin}")
+ continue
# The option --init is necessery if there is new submodule
- subprocess.run(["git", "submodule", "update", "--init", "--recursive"], cwd=str(plugin))
+ ret = subprocess.run(["git", "submodule", "update", "--init", "--recursive"], cwd=str(plugin))
+ if ret.returncode != 0:
+ print(f"Error updating {plugin}")
# Post install script
subprocess.run(["make", "hexokinase"], cwd="vim-hexokinase")
print('Post install Hexakinase done ✔️')
-installCmd = f"+:CocUpdate"
+installCmd = "+:CocUpdate"
subprocess.run(["nvim", installCmd])
print('Coc plugins update done ✔️')