mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
remove opening the first proj
This commit is contained in:
@@ -50,11 +50,9 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm
|
||||
return 1;
|
||||
}
|
||||
|
||||
Project projectToLaunch = projects[0];
|
||||
|
||||
Project projectToLaunch{};
|
||||
std::string idStr(cmdline);
|
||||
std::wstring id(idStr.begin(), idStr.end());
|
||||
Logger::info(L"command line: {}", id);
|
||||
if (!id.empty())
|
||||
{
|
||||
for (const auto& proj : projects)
|
||||
@@ -67,6 +65,12 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, LPSTR cmdline, int cm
|
||||
}
|
||||
}
|
||||
|
||||
if (projectToLaunch.id.empty())
|
||||
{
|
||||
Logger::info(L"Project {} not found", id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Logger::info(L"Launch Project {} : {}", projectToLaunch.name, projectToLaunch.id);
|
||||
|
||||
// launch apps
|
||||
|
||||
Reference in New Issue
Block a user