Comments (5)
Interesting. I'll definitely take a look. Seems like it could be tricky to find the root cause though. Thanks for the report!
from homebrew-rmtree.
I believe the issue is as you stated, with outdated dependencies. It seems as though when, in your example, lua
is outdated, rmtree
is not considering it installed and then gets excluded from subsequent operations. Should be pretty straightforward to fix.
from homebrew-rmtree.
And it looks like I have my very own test case. On my computer, brew uses node
only prints out yarn
. But when I try and fake remove yarn,
$ brew rmtree --dry-run yarn
This is a dry-run, nothing will be deleted
==> Examining installed formulae required by yarn...
/
Can safely be removed
----------------------
yarn
Won't be removed
-----------------
Order of operations
-------------------
yarn
Would have removed yarn
It should have also removed node
. Both node
and yarn
are outdated.
from homebrew-rmtree.
Ah, ok. Specifically the issue is with how we get the formula instance of what you want to remove. In my case, I have yarn
1.5, but rmtree
is using the formula for yarn
1.6, which depends on node
latest, which I don't have installed, which is why it isn't getting removed.
$ brew info yarn
yarn: stable 1.6.0
JavaScript package manager
https://yarnpkg.com/
Conflicts with:
hadoop (because both install `yarn` binaries)
/usr/local/Cellar/yarn/1.5.1_1 (14 files, 4.1MB) *
Built from source on 2018-03-20 at 15:53:57
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/yarn.rb
==> Dependencies
Recommended: node ✘
==> Options
--without-node
Build without node support
from homebrew-rmtree.
Ok, I think I found a solution. Now when I try and remove yarn
, it correctly looks at installed dependencies.
$ brew rmtree --dry-run yarn
This is a dry-run, nothing will be deleted
==> Examining installed formulae required by yarn...
/
Can safely be removed
----------------------
yarn
node
Won't be removed
-----------------
icu4c is used by harfbuzz, sqlite
Order of operations
-------------------
yarn
node
Would have removed yarn
Would have removed node
I'll publish the fix for this shortly. Thanks again for finding this and including all that helpful info @airdrummingfool
from homebrew-rmtree.
Related Issues (20)
- Feature Request Option to blacklist removal when confirmation is requested HOT 1
- private method `named' called HOT 2
- minor issue: homebrew aliases (e.g., "mc" for "midnight-commander") don't resolve as expected
- What does this error mean? HOT 2
- Error: undefined method `args_includes_ignores' for Homebrew:Module HOT 1
- Error: Calling Homebrew.args is disabled! Use `args = <command>_args.parse` and pass `args` along the call chain instead. HOT 1
- Problem with multiple homebrew installations HOT 3
- Homebrew v.3 install as in README.md not working HOT 2
- Thank you HOT 1
- Unable to remove packages HOT 6
- `--dry-run` broken (regression) ? HOT 1
- Consider upstreaming? HOT 2
- can not use --dry-run command HOT 3
- Error: undefined method `args' for Homebrew:Module HOT 1
- Doesn't work on linuxbrew
- No longer available as a Homebrew Formulae HOT 1
- brew autoremove HOT 1
- --dry-run option broken? HOT 3
- Error: undefined method `uses_args' for Homebrew:Module HOT 9
- undefined method `uses_args' for Homebrew:Module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-rmtree.