clib
clib copied to clipboard
clib-uninstall should remove the folder from deps if there's no rule to make uninstall
$ ls deps
. .. fnv-hash yacbnl
$ DEBUG=clib clib uninstall catb0t/yacbnl
clib : args: catb0t/yacbnl
clib : command 'uninstall'
clib : exec: /usr/local/bin/clib-uninstall catb0t/yacbnl
fetch : https://github.com/catb0t/yacbnl/archive/master.tar.gz
untar : /tmp/yacbnl-master.tar.gz
warning : No uninstall target specified. Defaulting to 'make uninstall'.
make: *** No rule to make target 'uninstall'. Stop.
clib : returned 0
in my opinion, clib-uninstall should work to remove deps from the current directory, if make uninstall didn't work because the package wasn't installed like make install.
what do you think about this addition? or should there be a separate plugin, clib-remove?
I like this idea!
I don't think we need to separate it into another program. I'm on board with having clib uninstall work for bins and libraries.
Doing clib uninstall user/repo where user/repo is a library (not a binary) should:
- error if there is no manifest (
{clib,package}.json) in$PWD - remove the
user/fooreference in the manifest- this should work for
developmentanddependencies - not error if missing
- this should work for
- remove the
deps/foodirectory- not error if missing
- error if neither
deps/foonor an entry in the manifest exist- could just be a warning (
logger.warn("Nothing to do"))
- could just be a warning (