aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_export.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-07-26 16:51:28 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-07-26 16:51:28 -0700
commit17b6d75d0d16d8b620e6680c0364208aa8a52651 (patch)
tree4c4babd17da8718f8169cc0e7232542fe8df1be1 /toolsrc/src/commands_export.cpp
parent800af576df9c632053f1e71f8c16a1c3d37caec2 (diff)
downloadvcpkg-17b6d75d0d16d8b620e6680c0364208aa8a52651.tar.gz
vcpkg-17b6d75d0d16d8b620e6680c0364208aa8a52651.zip
[vcpkg-export] Tweak error formatting
Diffstat (limited to 'toolsrc/src/commands_export.cpp')
-rw-r--r--toolsrc/src/commands_export.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp
index 5e1cc2052..4adfbc0f6 100644
--- a/toolsrc/src/commands_export.cpp
+++ b/toolsrc/src/commands_export.cpp
@@ -246,9 +246,12 @@ namespace vcpkg::Commands::Export
const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend();
const bool _7zip = options.switches.find(OPTION_7ZIP) != options.switches.cend();
- Checks::check_exit(VCPKG_LINE_INFO,
- raw || nuget || zip || _7zip,
- "Must provide at least one of the following options: --raw --nuget --zip --7zip");
+ if (!raw && !nuget && !zip && !_7zip && !dryRun)
+ {
+ System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip");
+ System::print(example);
+ Checks::exit_fail(VCPKG_LINE_INFO);
+ }
auto maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID);
auto maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION);