whalebrew/whalebrew

Broken uninstall (on brew version)

glensc opened this issue · 3 comments

$ whalebrew uninstall whalebrew/date
This will permanently delete '/usr/local/bin/whalebrew/date'. Are you sure? (y/n) [n]: y
open /usr/local/bin/whalebrew/date: not a directory

$ ls -ld /usr/local/bin/whalebrew/date /usr/local/bin/date
ls: cannot access '/usr/local/bin/whalebrew/date': Not a directory
-rwxr-xr-x 1 glen admin 65 27. veebr 14:25 /usr/local/bin/date*

$

installed from brew:

$ whalebrew --version
unknown flag: --version
$ whalebrew version
Whalebrew 0.3.0

Thanks for raising.
In the current implementation, whalebrew uninstall accepts the package name (i.e. date when the image is whalebrew/date) instead of the image name.

This is due to the fact that you can actually change the package name during installation using whalebrew install ${IMAGE_NAME} --name ${PATCKAGE_NAME}.

This makes it difficult to uniquely identify whalebrew packages from images.

I will evaluate what we can do in such a case though.

Seems it wants as an argument command name, i.e file from /usr/local/bin. does whalebrew have a registry of installed apps? or how does it know which are whalebrew bin wrappers?

the registry of installed package is actually the list of the installation directory itself.
By default, it goes to /usr/local/bin but can be customized using the WHALEBREW_INSTALL_PATH environment variable