conda / menuinst

Cross platform menu item installation
https://conda.github.io/menuinst/
BSD 3-Clause "New" or "Revised" License
33 stars 41 forks source link

Installation of MacOS apps fail when app already exists #203

Closed marcoesters closed 1 month ago

marcoesters commented 1 month ago

Checklist

What happened?

On Windows and Linux, shortcuts are overwritten when they already exist. On MacOS, menuinst exits with an error because it cannot create the Resources directory inside the app. This is due to the following lines: https://github.com/conda/menuinst/blob/main/menuinst/platforms/osx.py#L107-L108

for path in paths:
    path.mkdir(parents=True, exist_ok=False)

The MacOS app should be removed before installing a new one to make the behavior consistent.

Conda Info

No response

Conda Config

No response

Conda list

No response

Additional Context

No response

marcoesters commented 1 month ago

After discussion in the PR, we decided to improve the error message and provide ways to install the package even if a shortcut already exists.