aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_env.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-04-03 10:44:14 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-04-03 10:44:29 -0700
commitcb5cbc4d84d84e8199d58740e0e7ed3c6d3ba473 (patch)
tree091af6fccadb4597d55cf53c161c1a3635fe33c7 /toolsrc/src/commands_env.cpp
parentf9c01a893e79d5ae086294d0f11543cd37283438 (diff)
downloadvcpkg-cb5cbc4d84d84e8199d58740e0e7ed3c6d3ba473.tar.gz
vcpkg-cb5cbc4d84d84e8199d58740e0e7ed3c6d3ba473.zip
[vcpkg-env] Added internal 'env' command to help diagnose environment issues.
Diffstat (limited to 'toolsrc/src/commands_env.cpp')
-rw-r--r--toolsrc/src/commands_env.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/commands_env.cpp
new file mode 100644
index 000000000..314afb779
--- /dev/null
+++ b/toolsrc/src/commands_env.cpp
@@ -0,0 +1,17 @@
+#include "pch.h"
+#include "vcpkg_Commands.h"
+#include "vcpkg_System.h"
+
+namespace vcpkg::Commands::Env
+{
+ void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_triplet)
+ {
+ static const std::string example = Commands::Help::create_example_string(R"(env --triplet x64-windows)");
+ args.check_exact_arg_count(0, example);
+ args.check_and_get_optional_command_arguments({});
+
+ System::cmd_execute_clean(Build::make_build_env_cmd(default_triplet, paths.get_toolset()) + L" && cmd");
+
+ Checks::exit_success(VCPKG_LINE_INFO);
+ }
+}