From fcb248ed7ab2d7e5741c297f21782bc6d51cd266 Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 18 Apr 2023 08:49:13 +0200 Subject: Get repo name when fail to update a repo --- pack/ache/start/updatePlugin.py | 12 +++++++++--- 1 file 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 ✔️') -- cgit v1.2.3