diff --git a/include/vcpkg/remove.h b/include/vcpkg/remove.h index 74e56aaba5..5ac1cbb45f 100644 --- a/include/vcpkg/remove.h +++ b/include/vcpkg/remove.h @@ -8,14 +8,12 @@ namespace vcpkg::Remove { - enum class Purge + enum class Purge : bool { NO = 0, YES }; - inline Purge to_purge(const bool value) { return value ? Purge::YES : Purge::NO; } - void perform_remove_plan_action(const VcpkgPaths& paths, const Dependencies::RemovePlanAction& action, const Purge purge, diff --git a/src/vcpkg/commands.buildexternal.cpp b/src/vcpkg/commands.buildexternal.cpp index f81d111d3c..afe65c2771 100644 --- a/src/vcpkg/commands.buildexternal.cpp +++ b/src/vcpkg/commands.buildexternal.cpp @@ -10,7 +10,7 @@ namespace vcpkg::Commands::BuildExternal { const CommandStructure COMMAND_STRUCTURE = { - create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"), + create_example_string(R"(build-external zlib2 C:\path\to\dir\with\controlfile\)"), 2, 2, {}, diff --git a/src/vcpkg/commands.fetch.cpp b/src/vcpkg/commands.fetch.cpp index 89c9c30225..6cd57ae783 100644 --- a/src/vcpkg/commands.fetch.cpp +++ b/src/vcpkg/commands.fetch.cpp @@ -7,7 +7,7 @@ namespace vcpkg::Commands::Fetch { const CommandStructure COMMAND_STRUCTURE = { - Strings::format("The argument should be tool name\n%s", create_example_string("fetch cmake")), + Strings::format("The argument should be a tool name\n%s", create_example_string("fetch cmake")), 1, 1, {}, diff --git a/src/vcpkg/install.cpp b/src/vcpkg/install.cpp index b507d26b18..1b79002f9f 100644 --- a/src/vcpkg/install.cpp +++ b/src/vcpkg/install.cpp @@ -568,7 +568,7 @@ namespace vcpkg::Install }}; static constexpr std::array INSTALL_SETTINGS = {{ - {OPTION_XUNIT, "File to output results in XUnit format (Internal use)"}, + {OPTION_XUNIT, ""}, // internal use {OPTION_WRITE_PACKAGES_CONFIG, "Writes out a NuGet packages.config-formatted file for use with external binary caching.\nSee `vcpkg help " "binarycaching` for more information."}, diff --git a/src/vcpkg/remove.cpp b/src/vcpkg/remove.cpp index 9ce4b71664..a326b16227 100644 --- a/src/vcpkg/remove.cpp +++ b/src/vcpkg/remove.cpp @@ -171,8 +171,8 @@ namespace vcpkg::Remove static constexpr StringLiteral OPTION_OUTDATED = "outdated"; static constexpr std::array SWITCHES = {{ - {OPTION_PURGE, "Remove the cached copy of the package (default)"}, - {OPTION_NO_PURGE, "Do not remove the cached copy of the package (deprecated)"}, + {OPTION_PURGE, ""}, + {OPTION_NO_PURGE, ""}, {OPTION_RECURSE, "Allow removal of packages not explicitly specified on the command line"}, {OPTION_DRY_RUN, "Print the packages to be removed, but do not remove them"}, {OPTION_OUTDATED, "Select all packages with versions that do not match the portfiles"}, @@ -242,15 +242,15 @@ namespace vcpkg::Remove Input::check_triplet(spec.triplet(), paths); } - const bool no_purge_was_passed = Util::Sets::contains(options.switches, OPTION_NO_PURGE); - const bool purge_was_passed = Util::Sets::contains(options.switches, OPTION_PURGE); - if (purge_was_passed && no_purge_was_passed) + const bool no_purge = Util::Sets::contains(options.switches, OPTION_NO_PURGE); + if (no_purge && Util::Sets::contains(options.switches, OPTION_PURGE)) { print2(Color::error, "Error: cannot specify both --no-purge and --purge.\n"); print2(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } - const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); + const Purge purge = no_purge ? Purge::NO : Purge::YES; + const bool is_recursive = Util::Sets::contains(options.switches, OPTION_RECURSE); const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); diff --git a/src/vcpkg/vcpkgcmdarguments.cpp b/src/vcpkg/vcpkgcmdarguments.cpp index a404be424b..00cda1d505 100644 --- a/src/vcpkg/vcpkgcmdarguments.cpp +++ b/src/vcpkg/vcpkgcmdarguments.cpp @@ -650,11 +650,6 @@ namespace vcpkg "(Experimental) Specify the buildtrees root directory"); table.format(opt(INSTALL_ROOT_DIR_ARG, "=", ""), "(Experimental) Specify the install root directory"); table.format(opt(PACKAGES_ROOT_DIR_ARG, "=", ""), "(Experimental) Specify the packages root directory"); - table.format(opt(SCRIPTS_ROOT_DIR_ARG, "=", ""), "(Experimental) Specify the scripts root directory"); - table.format(opt(BUILTIN_PORTS_ROOT_DIR_ARG, "=", ""), - "(Experimental) Specify the packages root directory"); - table.format(opt(BUILTIN_REGISTRY_VERSIONS_DIR_ARG, "=", ""), - "(Experimental) Specify the versions root directory"); table.format(opt(JSON_SWITCH, "", ""), "(Experimental) Request JSON output"); }