[vcpkg] Show Empty Object on vcpkg --list when used with --x-json
Thanks to for recommending using Json::stringify over my initial idea of simply printing an empty object
Closes
MODIFY
src/vcpkg/commands.list.cpp
src/vcpkg/commands.list.cpp
@@ -95,6 +95,9 @@ namespace vcpkg::Commands::List
if (installed_ipv.empty())
{
+ if (args.output_json())
+ System::print2(Json::stringify(Json::Object(), {}));
+ else
System::print2("No packages are installed. Did you mean `search`?\n");
Checks::exit_success(VCPKG_LINE_INFO);
}

[vcpkg] Show Empty Object on vcpkg --list when used with --x-json (#13667)

Thanks to @strega-nil for recommending using Json::stringify over my initial idea of simply printing an empty object

Closes #13637