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

make --clean-cache available as root command #169

Merged
merged 1 commit into from
Aug 18, 2020
Merged

Conversation

bhamail
Copy link
Contributor

@bhamail bhamail commented Aug 17, 2020

Having the --clean-cache only available via sleuth is awkward because clearing the cache is not specific to the sleuth command. Clearing the cache would also affect the iq command - in that a call to ossi would always occur after the cache is cleared.

When the clear impl was only in the sleuth command, there was a bug that allowed a CLI call like: nancy -c to appear to succeed, but the cache was not actually cleared. This was because the -c was valid everywhere (a "PersistentFlag" in Cobra lingo), but was ONLY implemented in the sleuth call stack.

This PR makes the --clean-cache occur as part of the rootCmd.

cc @bhamail / @DarthHater

@bhamail bhamail merged commit aa14359 into internal_cmd Aug 18, 2020
@bhamail bhamail deleted the root_clean_cache branch August 18, 2020 22:05
bhamail added a commit that referenced this pull request Aug 18, 2020
* move cmd to internal package. fixes #166

* make `--clean-cache` available as root command, since it is not specific to ossi or iq. (#169)
bhamail added a commit that referenced this pull request Aug 19, 2020
* move cmd to internal package. fixes #166

* make `--clean-cache` available as root command, since it is not specific to ossi or iq. (#169)
bhamail added a commit that referenced this pull request Aug 19, 2020
* move cmd to internal package. fixes #166 (#168)

* make `--clean-cache` available as root command, since it is not specific to ossi or iq. (#169)
bhamail added a commit that referenced this pull request Aug 27, 2020
…ial release (#161)

* Cobra/Viper CLI. 
* Goodbye go.sum old friend
  You were fine to start but newer better things came along. We will never forget your
  contributions to the cause.
* fix missing -p flag, document --loud flag
* Make some packages internal (#163)
* remove types that migrated to go-sona-types library (#164)
* store config using nested yaml (ossi.yadda, iq.yadda).
* separate `sleuth` command for 'oss index' (#165)
  new sub command named `sleuth` for running nancy against OSS Index.
* make `--clean-cache` available as root command, since it is not specific to ossi or iq. (#169)
* Latest dependencies, remove obsolete 'replace' directives (#173)
* Use goreleaser to build native linux installers (#175)

Co-authored-by: Nathan Zender <github@nathanzender.com>
Co-authored-by: Jeffry Hesse <5544326+DarthHater@users.noreply.github.com>
zendern added a commit to zendern/nancy that referenced this pull request Apr 16, 2021
…ial release (sonatype-nexus-community#161)

* Cobra/Viper CLI. 
* Goodbye go.sum old friend
  You were fine to start but newer better things came along. We will never forget your
  contributions to the cause.
* fix missing -p flag, document --loud flag
* Make some packages internal (sonatype-nexus-community#163)
* remove types that migrated to go-sona-types library (sonatype-nexus-community#164)
* store config using nested yaml (ossi.yadda, iq.yadda).
* separate `sleuth` command for 'oss index' (sonatype-nexus-community#165)
  new sub command named `sleuth` for running nancy against OSS Index.
* make `--clean-cache` available as root command, since it is not specific to ossi or iq. (sonatype-nexus-community#169)
* Latest dependencies, remove obsolete 'replace' directives (sonatype-nexus-community#173)
* Use goreleaser to build native linux installers (sonatype-nexus-community#175)

Co-authored-by: Nathan Zender <github@nathanzender.com>
Co-authored-by: Jeffry Hesse <5544326+DarthHater@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants