pkill37 / linuxify

🍏🐧 Transparently transform the macOS CLI into a fresh GNU/Linux CLI experience.
MIT License
888 stars 69 forks source link

linuxify uninstall fails because of python dependency #27

Open abulka opened 3 years ago

abulka commented 3 years ago

Tried to uninstall and got this error:

$ ./linuxify uninstall
Error: Refusing to uninstall /usr/local/Cellar/python@3.9/3.9.1_6
because it is required by cairo, gdk-pixbuf, glances, glib, gobject-introspection, graphviz, gts, harfbuzz, imagemagick, libheif, liblqr, librsvg, pango, plantuml, shared-mime-info, sphinx-doc and termtosvg, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies python

not sure whether to follow the advice of brew or do something else?

pkill37 commented 3 years ago

Best is to keep these packages upon which others depend on, so as to not break anything.

Edit the linuxify script and replace line 142

brew uninstall -f $(echo "${linuxify_formulas[i]}" | cut -d ' ' -f1)

with

brew uninstall $(echo "${linuxify_formulas[i]}" | cut -d ' ' -f1) || true

and any errors there will be caught and ignored, effectively meaning any package that is depended upon will not be removed.

I'm rewriting the script so I'll take this in consideration. Thanks!

gerardbosch commented 3 years ago

Hello! I faced the same issue. Do you think you could or should add a commit to add the || true part in uninstall? Thx :)