@@ -172,6 +172,7 @@ namespace vcpkg
172172 const CMakeVars::CMakeVarProvider& cmake_vars,
173173 ActionPlan action_plan,
174174 DryRun dry_run,
175+ PrintUsage print_usage,
175176 const Optional<Path>& maybe_pkgconfig,
176177 bool include_manifest_in_github_issue)
177178 {
@@ -257,7 +258,7 @@ namespace vcpkg
257258 }
258259 }
259260
260- if (build_options. print_usage == PrintUsage::Yes)
261+ if (print_usage == PrintUsage::Yes)
261262 {
262263 // Note that this differs from the behavior of `vcpkg install` in that it will print usage information for
263264 // packages named but not installed here
@@ -287,15 +288,12 @@ namespace vcpkg
287288 .value_or_exit (VCPKG_LINE_INFO);
288289 });
289290
290- const bool dry_run = Util::Sets::contains (options.switches , SwitchDryRun);
291291 const auto only_downloads =
292292 Util::Sets::contains (options.switches , SwitchOnlyDownloads) ? OnlyDownloads::Yes : OnlyDownloads::No;
293293 const auto keep_going =
294294 Util::Sets::contains (options.switches , SwitchKeepGoing) || only_downloads == OnlyDownloads::Yes
295295 ? KeepGoing::Yes
296296 : KeepGoing::No;
297- const auto print_usage =
298- Util::Sets::contains (options.switches , SwitchNoPrintUsage) ? PrintUsage::No : PrintUsage::Yes;
299297 const auto unsupported_port_action = Util::Sets::contains (options.switches , SwitchAllowUnsupported)
300298 ? UnsupportedPortAction::Warn
301299 : UnsupportedPortAction::Error;
@@ -312,7 +310,6 @@ namespace vcpkg
312310 CleanDownloads::No,
313311 DownloadTool::Builtin,
314312 prohibit_backcompat_features,
315- print_usage,
316313 keep_going,
317314 };
318315
@@ -339,14 +336,17 @@ namespace vcpkg
339336 specs,
340337 {},
341338 {nullptr , host_triplet, paths.packages (), unsupported_port_action, UseHeadVersion::No, Editable::No});
342- command_set_installed_and_exit_ex (args,
343- paths,
344- host_triplet,
345- build_options,
346- *cmake_vars,
347- std::move (action_plan),
348- dry_run ? DryRun::Yes : DryRun::No,
349- pkgsconfig,
350- false );
339+
340+ command_set_installed_and_exit_ex (
341+ args,
342+ paths,
343+ host_triplet,
344+ build_options,
345+ *cmake_vars,
346+ std::move (action_plan),
347+ Util::Sets::contains (options.switches , SwitchDryRun) ? DryRun::Yes : DryRun::No,
348+ Util::Sets::contains (options.switches , SwitchNoPrintUsage) ? PrintUsage::No : PrintUsage::Yes,
349+ pkgsconfig,
350+ false );
351351 }
352352} // namespace vcpkg
0 commit comments