Skip to content

Commit

Permalink
[help] remove help text for things we don't want people using (#253)
Browse files Browse the repository at this point in the history
* [help] remove help text for things we don't want people using

* clang-format

* Restore buildtrees and packages for now until we have the better replacement.

Co-authored-by: nicole mazzuca <[email protected]>
Co-authored-by: Billy Robert O'Neal III <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2021
1 parent 9a89a14 commit 8d4d040
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
4 changes: 1 addition & 3 deletions include/vcpkg/remove.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg/commands.buildexternal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
{},
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg/commands.fetch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
{},
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ namespace vcpkg::Install
}};

static constexpr std::array<CommandSetting, 2> 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."},
Expand Down
12 changes: 6 additions & 6 deletions src/vcpkg/remove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ namespace vcpkg::Remove
static constexpr StringLiteral OPTION_OUTDATED = "outdated";

static constexpr std::array<CommandSwitch, 5> 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"},
Expand Down Expand Up @@ -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);

Expand Down
5 changes: 0 additions & 5 deletions src/vcpkg/vcpkgcmdarguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,6 @@ namespace vcpkg
"(Experimental) Specify the buildtrees root directory");
table.format(opt(INSTALL_ROOT_DIR_ARG, "=", "<path>"), "(Experimental) Specify the install root directory");
table.format(opt(PACKAGES_ROOT_DIR_ARG, "=", "<path>"), "(Experimental) Specify the packages root directory");
table.format(opt(SCRIPTS_ROOT_DIR_ARG, "=", "<path>"), "(Experimental) Specify the scripts root directory");
table.format(opt(BUILTIN_PORTS_ROOT_DIR_ARG, "=", "<path>"),
"(Experimental) Specify the packages root directory");
table.format(opt(BUILTIN_REGISTRY_VERSIONS_DIR_ARG, "=", "<path>"),
"(Experimental) Specify the versions root directory");
table.format(opt(JSON_SWITCH, "", ""), "(Experimental) Request JSON output");
}

Expand Down

0 comments on commit 8d4d040

Please sign in to comment.