From 1ac7390d5edea37498d80e2f2940ff7e248f442a Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Fri, 17 Feb 2023 21:19:27 +0100 Subject: [PATCH] Skip already installed package. --- osdk/cmds.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osdk/cmds.py b/osdk/cmds.py index d3686e0..daed5df 100644 --- a/osdk/cmds.py +++ b/osdk/cmds.py @@ -1,4 +1,5 @@ from typing import Callable, cast +import os from osdk.args import Args from osdk.context import contextFor @@ -174,6 +175,10 @@ def installCmd(args: Args): extPath = f"{const.EXTERN_DIR}/{extSpec}" + if os.path.exists(extPath): + print(f"Skipping {extSpec}, already installed") + continue + print(f"Installing {extSpec}-{ext.tag} from {ext.git}...") shell.popen("git", "clone", "--depth", "1", "--branch", ext.tag, ext.git, extPath)