Skip to content

Commit

Permalink
Initialize console after parsing arguments (#263)
Browse files Browse the repository at this point in the history
Fixes #262
  • Loading branch information
heaths authored Apr 29, 2022
1 parent e2e4e03 commit 22c4136
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vswhere/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ int wmain(_In_ int argc, _In_ LPCWSTR argv[])
Console console(args);
Module queryModule;

console.Initialize();
try
{
CoInitializer init;
Expand All @@ -37,6 +36,8 @@ int wmain(_In_ int argc, _In_ LPCWSTR argv[])
queryModule.FromIUnknown(static_cast<IUnknown*>(query));

args.Parse(argc, argv);
console.Initialize();

if (args.get_Help())
{
WriteLogo(args, console, queryModule);
Expand Down

0 comments on commit 22c4136

Please sign in to comment.