Skip confirmation for alias with -alias/-cli flag

The user has already specified this is what they want by passing in the
flag, so there is no point in asking again.
This commit is contained in:
Tobiasz Laskowski
2025-01-22 02:35:27 +00:00
committed by Josh Tynjala
parent dd9f9d40c9
commit 69bbcaea27

View File

@@ -875,13 +875,16 @@ class PlatformSetup
var installedCommand = false;
var answer = YES;
if (targetFlags.exists("y"))
if (!(targetFlags.exists("alias") || targetFlags.exists("cli")))
{
Sys.println("Do you want to install the \"lime\" command? [y/n/a] y");
}
else
{
answer = CLIHelper.ask("Do you want to install the \"lime\" command?");
if (targetFlags.exists("y"))
{
Sys.println("Do you want to install the \"lime\" command? [y/n/a] y");
}
else
{
answer = CLIHelper.ask("Do you want to install the \"lime\" command?");
}
}
if (answer == YES || answer == ALWAYS)
@@ -1123,13 +1126,16 @@ class PlatformSetup
var installedCommand = false;
var answer = YES;
if (targetFlags.exists("y"))
if (!(targetFlags.exists("alias") || targetFlags.exists("cli")))
{
Sys.println("Do you want to install the \"openfl\" command? [y/n/a] y");
}
else
{
answer = CLIHelper.ask("Do you want to install the \"openfl\" command?");
if (targetFlags.exists("y"))
{
Sys.println("Do you want to install the \"openfl\" command? [y/n/a] y");
}
else
{
answer = CLIHelper.ask("Do you want to install the \"openfl\" command?");
}
}
if (answer == YES || answer == ALWAYS)