LukeSmithxyz / mutt-wizard

A system for automatically configuring mutt and isync with a simple interface and safe passwords
GNU General Public License v3.0
2.42k stars 384 forks source link

`make uninstall` tries to delete everything in `/usr/local/bin` #705

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello, so I was in the process of uninstalling mutt-wizard, and when I ran make uninstall, mutt-wizard wanted to delete /usr/local/bin, or it least the contents of it. Here is what I mean.

❯ make uninstall
for script in bin/*; do \
        rm -f /usr/local/$script; \
    done
    rm: cannot remove '/usr/local/bin/DSDecmp': Is a directory
    rm: cannot remove '/usr/local/bin/acorn': Permission denied
    rm: cannot remove '/usr/local/bin/activate-global-python-argcomplete': Permission denied
    rm: cannot remove '/usr/local/bin/afterwriting': Permission denied
    rm: cannot remove '/usr/local/bin/afterwriting-fonts': Permission denied
    rm: cannot remove '/usr/local/bin/alacritty': Permission denied
    rm: cannot remove '/usr/local/bin/apktool': Permission denied
    rm: cannot remove '/usr/local/bin/apktool.jar': Permission denied
    rm: cannot remove '/usr/local/bin/betterdiscordctl': Permission denied
    rm: cannot remove '/usr/local/bin/brfs': Permission denied
    rm: cannot remove '/usr/local/bin/browsh': Permission denied
    rm: cannot remove '/usr/local/bin/bundle': Permission denied
    rm: cannot remove '/usr/local/bin/bundler': Permission denied
    rm: cannot remove '/usr/local/bin/cake': Permission denied
    rm: cannot remove '/usr/local/bin/chardetect': Permission denied
    rm: cannot remove '/usr/local/bin/coffee': Permission denied
    rm: cannot remove '/usr/local/bin/csv2rdf': Permission denied
    rm: cannot remove '/usr/local/bin/dsdecmp': Permission denied
    rm: cannot remove '/usr/local/bin/escodegen': Permission denied
    rm: cannot remove '/usr/local/bin/esgenerate': Permission denied
    rm: cannot remove '/usr/local/bin/esparse': Permission denied
    rm: cannot remove '/usr/local/bin/esvalidate': Permission denied
    rm: cannot remove '/usr/local/bin/f2py': Permission denied
    rm: cannot remove '/usr/local/bin/f2py3': Permission denied
    rm: cannot remove '/usr/local/bin/f2py3.9': Permission denied
    rm: cannot remove '/usr/local/bin/flake8': Permission denied
    rm: cannot remove '/usr/local/bin/fonttools': Permission denied
    rm: cannot remove '/usr/local/bin/g910-gkeys': Permission denied
    rm: cannot remove '/usr/local/bin/genkfs': Permission denied
    rm: cannot remove '/usr/local/bin/gtts-cli': Permission denied
    rm: cannot remove '/usr/local/bin/gunzip-maybe': Permission denied
    rm: cannot remove '/usr/local/bin/handlebars': Permission denied
    rm: cannot remove '/usr/local/bin/imageio_download_bin': Permission denied
    rm: cannot remove '/usr/local/bin/imageio_remove_bin': Permission denied
    rm: cannot remove '/usr/local/bin/irb': Permission denied
    rm: cannot remove '/usr/local/bin/is-ci': Permission denied
    rm: cannot remove '/usr/local/bin/is-docker': Permission denied
    rm: cannot remove '/usr/local/bin/js-yaml': Permission denied
    rm: cannot remove '/usr/local/bin/jsonschema': Permission denied
    rm: cannot remove '/usr/local/bin/kcc': Permission denied
    rm: cannot remove '/usr/local/bin/kimg': Permission denied
    rm: cannot remove '/usr/local/bin/knightos': Permission denied
    rm: cannot remove '/usr/local/bin/kpack': Permission denied
    rm: cannot remove '/usr/local/bin/listen': Permission denied
    rm: cannot remove '/usr/local/bin/m4baker': Permission denied
    rm: cannot remove '/usr/local/bin/mailsync': Permission denied
    rm: cannot remove '/usr/local/bin/mako-render': Permission denied
    rm: cannot remove '/usr/local/bin/markdown-toc': Permission denied
    rm: cannot remove '/usr/local/bin/markdown_py': Permission denied
    rm: cannot remove '/usr/local/bin/matrixcli': Permission denied
    rm: cannot remove '/usr/local/bin/mcedit-1.5.6.0': Is a directory
    rm: cannot remove '/usr/local/bin/meson': Permission denied
    rm: cannot remove '/usr/local/bin/mid2sco': Permission denied
    rm: cannot remove '/usr/local/bin/mkdirp': Permission denied
    rm: cannot remove '/usr/local/bin/mktiupgrade': Permission denied
    rm: cannot remove '/usr/local/bin/mw': Permission denied
    rm: cannot remove '/usr/local/bin/ndsfuse': Permission denied
    rm: cannot remove '/usr/local/bin/ndstest': Permission denied
    rm: cannot remove '/usr/local/bin/ndstool': Permission denied
    rm: cannot remove '/usr/local/bin/needle': Permission denied
    rm: cannot remove '/usr/local/bin/neovim-node-host': Permission denied
    rm: cannot remove '/usr/local/bin/ng': Permission denied
    rm: cannot remove '/usr/local/bin/npm': Permission denied
    rm: cannot remove '/usr/local/bin/npm-tree': Permission denied
    rm: cannot remove '/usr/local/bin/npx': Permission denied
    rm: cannot remove '/usr/local/bin/omega-cli': Permission denied
    rm: cannot remove '/usr/local/bin/openfile': Permission denied
    rm: cannot remove '/usr/local/bin/parse-nodejs-lockfile': Permission denied
    rm: cannot remove '/usr/local/bin/pdf-stapler': Permission denied
    rm: cannot remove '/usr/local/bin/pip': Permission denied
    rm: cannot remove '/usr/local/bin/pip3': Permission denied
    rm: cannot remove '/usr/local/bin/pip3.9': Permission denied
    rm: cannot remove '/usr/local/bin/protonvpn': Permission denied
    rm: cannot remove '/usr/local/bin/pwiz.py': Permission denied
    rm: cannot remove '/usr/local/bin/pybabel': Permission denied
    rm: cannot remove '/usr/local/bin/pyftmerge': Permission denied
    rm: cannot remove '/usr/local/bin/pyftsubset': Permission denied
    rm: cannot remove '/usr/local/bin/pygmentize': Permission denied
    rm: cannot remove '/usr/local/bin/pylupdate5': Permission denied
    rm: cannot remove '/usr/local/bin/pyrcc5': Permission denied
    rm: cannot remove '/usr/local/bin/pystache': Permission denied
    rm: cannot remove '/usr/local/bin/pystache-test': Permission denied
    rm: cannot remove '/usr/local/bin/python-argcomplete-check-easy-install-script': Permission denied
    rm: cannot remove '/usr/local/bin/python-argcomplete-tcsh': Permission denied
    rm: cannot remove '/usr/local/bin/pyuic5': Permission denied
    rm: cannot remove '/usr/local/bin/quote-stream': Permission denied
    rm: cannot remove '/usr/local/bin/rc': Permission denied
    rm: cannot remove '/usr/local/bin/rdf2dot': Permission denied
    rm: cannot remove '/usr/local/bin/rdfgraphisomorphism': Permission denied
    rm: cannot remove '/usr/local/bin/rdfpipe': Permission denied
    rm: cannot remove '/usr/local/bin/rdfs2dot': Permission denied
    rm: cannot remove '/usr/local/bin/rdoc': Permission denied
    rm: cannot remove '/usr/local/bin/register-python-argcomplete': Permission denied
    rm: cannot remove '/usr/local/bin/remarkable': Permission denied
    rm: cannot remove '/usr/local/bin/reuse': Permission denied
    rm: cannot remove '/usr/local/bin/ri': Permission denied
    rm: cannot remove '/usr/local/bin/rimraf': Permission denied
    rm: cannot remove '/usr/local/bin/sass': Permission denied
    rm: cannot remove '/usr/local/bin/sass-convert': Permission denied
    rm: cannot remove '/usr/local/bin/scas': Permission denied
    rm: cannot remove '/usr/local/bin/scdump': Permission denied
    rm: cannot remove '/usr/local/bin/scoreproc': Permission denied
    rm: cannot remove '/usr/local/bin/scour': Permission denied
    rm: cannot remove '/usr/local/bin/scss': Permission denied
    rm: cannot remove '/usr/local/bin/scwrap': Permission denied
    rm: cannot remove '/usr/local/bin/semver': Permission denied
    rm: cannot remove '/usr/local/bin/snyk': Permission denied
    rm: cannot remove '/usr/local/bin/stapler': Permission denied
    rm: cannot remove '/usr/local/bin/tbs': Permission denied
    rm: cannot remove '/usr/local/bin/tempomod': Permission denied
    rm: cannot remove '/usr/local/bin/tree-kill': Permission denied
    rm: cannot remove '/usr/local/bin/treetest': Permission denied
    rm: cannot remove '/usr/local/bin/ttx': Permission denied
    rm: cannot remove '/usr/local/bin/uglifyjs': Permission denied
    rm: cannot remove '/usr/local/bin/update_rubygems': Permission denied
    rm: cannot remove '/usr/local/bin/uuid': Permission denied
    rm: cannot remove '/usr/local/bin/virtualenv': Permission denied
    rm: cannot remove '/usr/local/bin/which': Permission denied
    rm: cannot remove '/usr/local/bin/xml-js': Permission denied
    rm: cannot remove '/usr/local/bin/z80-asm': Permission denied
    rm: cannot remove '/usr/local/bin/z80-mon': Permission denied
    rm: cannot remove '/usr/local/bin/z80e-sdl': Permission denied
    rm: cannot remove '/usr/local/bin/z80e-tui': Permission denied
    make: *** [Makefile:36: uninstall] Error 1

Apologies if this has been reported before. I will just manually uninstall mutt-wizard, but I think it's an issue when the program tries to remove your /usr/local/share.

LukeSmithxyz commented 3 years ago

Can't replicate this. As the for loop shows, it should only try to delete the files in mw's bin/. I might just have it manually specify the files anyway to avoid your problem since this is a holdover from when there used to be a lot of other executables.