Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --clean to remove old generated binaries from the cache #19

Closed
natefinch opened this issue Sep 29, 2017 · 3 comments
Closed

add --clean to remove old generated binaries from the cache #19

natefinch opened this issue Sep 29, 2017 · 3 comments

Comments

@natefinch
Copy link
Member

No description provided.

@zmackie
Copy link
Contributor

zmackie commented Dec 22, 2017

@natefinch If this isn't claimed, I'd like to take it on.
Questions:

  1. Would this be a flag intended to be run on its own, or could it be included with any other command? If the latter, would it run before or after the command in question? If the former, is this a command similar to showVersion or mageInit that would get stuck in this if chain: https://github.com/magefile/mage/blob/master/mage/main.go#L91 ?
  2. How do you think this should interact with Keep or is that command orthogonal?

@natefinch
Copy link
Member Author

Awesome, thanks!

So.... ideally I'd like to refactor the command-ish flags so they are required to be run only by themselves. As much as it might be handy to run mage --clean foo bar, the combinatorics become crazy as more commands are created.

So, let's say, starting with this command, if -clean is set, we'll bail if fs.NArgs() > 0 or if fs.NFlags() > 1. I.e. bail if the user specified any other flags or positional args.

And then we can do a separate PR to make -version and -init work the same way.

@natefinch
Copy link
Member Author

This is done as stated above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants