aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_hash.cpp
diff options
context:
space:
mode:
authorThomas Fussell <thomas.fussell@gmail.com>2017-03-12 17:44:06 -0400
committerThomas Fussell <thomas.fussell@gmail.com>2017-03-12 17:44:06 -0400
commit2f42035ab43dd50cd863b51944aa099a99ae60f0 (patch)
tree4b6cfd43955e946721c58028fd8564c861d5c331 /toolsrc/src/commands_hash.cpp
parente02e85626f3206feda86a6f5757009005e0cfe3e (diff)
parent1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff)
downloadvcpkg-2f42035ab43dd50cd863b51944aa099a99ae60f0.tar.gz
vcpkg-2f42035ab43dd50cd863b51944aa099a99ae60f0.zip
Merge branch 'master' of git://github.com/Microsoft/vcpkg
Diffstat (limited to 'toolsrc/src/commands_hash.cpp')
-rw-r--r--toolsrc/src/commands_hash.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp
index 0e3e8a77c..805da4153 100644
--- a/toolsrc/src/commands_hash.cpp
+++ b/toolsrc/src/commands_hash.cpp
@@ -1,7 +1,8 @@
+#include "pch.h"
#include "vcpkg_Commands.h"
#include "vcpkg_System.h"
-namespace vcpkg
+namespace vcpkg::Commands::Hash
{
static void do_file_hash(fs::path const& path, std::wstring const& hashType)
{
@@ -23,12 +24,13 @@ namespace vcpkg
System::println(hash);
}
- void hash_command(const vcpkg_cmd_arguments& args)
+ void perform_and_exit(const vcpkg_cmd_arguments& args)
{
static const std::string example = Strings::format(
- "The argument should be a file path\n%s", create_example_string("hash boost_1_62_0.tar.bz2"));
+ "The argument should be a file path\n%s", Commands::Help::create_example_string("hash boost_1_62_0.tar.bz2"));
args.check_min_arg_count(1, example);
args.check_max_arg_count(2, example);
+ args.check_and_get_optional_command_arguments({});
if (args.command_arguments.size() == 1)
{