Skip to content

Commit

Permalink
icm install: collection not installed if already exists!
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Jun 26, 2024
1 parent 44593ec commit a2d71d4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions icm/commands/cmd_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,18 @@ def install(collection: commons.Collection, name: str, version="") -> None:

# -- Get the name+tag
nametag = collection.nametag(name, version)

# -- Build the collection path to the folder
folders = commons.Folders()
collection_path = folders.collections / nametag

click.secho(f"Installing collection {nametag}", fg="yellow")

# -- Check if that collection already exists!
if collection_path.exists():
print(" Collection Already exists!")
return

abs_filename = collection.abs_filename(version)
url = collection.url(name, version)

Expand Down

0 comments on commit a2d71d4

Please sign in to comment.