Refactor CLI - #881
Merged
Merged
Conversation
sam-berning
added a commit
to sam-berning/tough
that referenced
this pull request
Jul 9, 2026
cargo-deny 0.20.2 deprecated the --disable-fetch flag, with its functionality provided by the --offline flag on the root command. See [cargo-deny#881](EmbarkStudios/cargo-deny#881) Signed-off-by: Sam Berning <bernings@amazon.com>
sam-berning
added a commit
to sam-berning/tough
that referenced
this pull request
Jul 9, 2026
cargo-deny 0.20.2 deprecated the --disable-fetch flag, with its functionality provided by the --offline flag on the root command. See [cargo-deny#881](EmbarkStudios/cargo-deny#881) This is not a clean upgrade though, since --offline prevents any type of network call, which means if we need to fetch dependency crates, the cargo-deny command will fail. This is the case in our GitHub actions. Since we're not running advisories checks, and this flag is only applicable to those, we can safely remove the flag, and there is no need to enable --offline. Signed-off-by: Sam Berning <bernings@amazon.com>
sam-berning
added a commit
to sam-berning/tough
that referenced
this pull request
Jul 10, 2026
cargo-deny 0.20.2 deprecated the --disable-fetch flag, with its functionality provided by the --offline flag on the root command. See [cargo-deny#881](EmbarkStudios/cargo-deny#881) This is not a clean upgrade though, since --offline prevents any type of network call, which means if we need to fetch dependency crates, the cargo-deny command will fail. This is the case in our GitHub actions. Since we're not running advisories checks, and this flag is only applicable to those, we can safely remove the flag, and there is no need to enable --offline. Signed-off-by: Sam Berning <bernings@amazon.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This refactors the CLI, removing
clap_derivein favor of the builder approach. This is a breaking change as several options were moved from subcommands into the root, as well as removing some deprecated values/flags.<root>--configPreviously available on the
checkandlistsubcommands, this is now specified on the root. It is also the path that will be written to when usinginit.--metadata-pathPreviously available on the
checkandlistsubcommands, this is now specified on the root. This is the path to a file with the output ofcargo metadataso thatcargois not needed.--allow-git-indexThis flag was deprecated a while ago and had no effect.
check-c, --configMoved to root as
--config--metadata-pathMoved to root.
-d, --disable-fetchNow specified by the
--offlineflag that already existed on root.--exclude-devNow specified by the
--exclude-devflag that already existed on root.WHICHThe
banandlicenseoptions for which checks to run were deprecated a long time ago in favor ofbansandlicensesfor consistency, they are now removed.fetch-c, --configMoved to root as
--config.initCONFIGMoved to root as
--configlist-c, --configMoved to root as
--config--metadata-pathMoved to root.
Resolves: #874
Closes: #875