-
Notifications
You must be signed in to change notification settings - Fork 287
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
upgrade: Make --keep-going the default #308
upgrade: Make --keep-going the default #308
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it
I like this choice; however, it definitely requires discussion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just some minor stuff.
src/vcpkg/commands.upgrade.cpp
Outdated
{OPTION_NO_DRY_RUN, "Actually upgrade"}, | ||
{OPTION_KEEP_GOING, "Continue installing packages on failure"}, | ||
{OPTION_KEEP_GOING, "The default (deprecated)"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{OPTION_KEEP_GOING, "The default (deprecated)"}, | |
{OPTION_KEEP_GOING, "Continue installing packages on failure (default)"}, |
src/vcpkg/commands.upgrade.cpp
Outdated
{OPTION_NO_DRY_RUN, "Actually upgrade"}, | ||
{OPTION_KEEP_GOING, "Continue installing packages on failure"}, | ||
{OPTION_KEEP_GOING, "The default (deprecated)"}, | ||
{OPTION_STOP_AT_FAILURE, "Stop installing packages on failure"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{OPTION_STOP_AT_FAILURE, "Stop installing packages on failure"}, | |
{OPTION_NO_KEEP_GOING, "Stop installing packages on failure"}, |
src/vcpkg/commands.upgrade.cpp
Outdated
if (Util::Sets::contains(options.switches, OPTION_KEEP_GOING)) | ||
{ | ||
print2(Color::warning, | ||
"The option `", | ||
OPTION_KEEP_GOING, | ||
"` is the default now. You don't have to pass this option anymore."); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (Util::Sets::contains(options.switches, OPTION_KEEP_GOING)) | |
{ | |
print2(Color::warning, | |
"The option `", | |
OPTION_KEEP_GOING, | |
"` is the default now. You don't have to pass this option anymore."); | |
} |
it's not standard practice to warn on passing the "default" for an option.
@@ -54,8 +56,16 @@ namespace vcpkg::Commands::Upgrade | |||
|
|||
const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, make sure that you check for both OPTION_KEEP_GOING
and OPTION_NO_KEEP_GOING
and error if both are passed.
src/vcpkg/commands.upgrade.cpp
Outdated
@@ -24,11 +24,13 @@ namespace vcpkg::Commands::Upgrade | |||
|
|||
static constexpr StringLiteral OPTION_NO_DRY_RUN = "no-dry-run"; | |||
static constexpr StringLiteral OPTION_KEEP_GOING = "keep-going"; | |||
static constexpr StringLiteral OPTION_STOP_AT_FAILURE = "stop-at-failure"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static constexpr StringLiteral OPTION_STOP_AT_FAILURE = "stop-at-failure"; | |
static constexpr StringLiteral OPTION_NO_KEEP_GOING = "no-keep-going"; |
this is the standard.
Closes #17922