From 69bbcaea2708567f501eaf89d29cb2591de18b79 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Wed, 22 Jan 2025 02:35:27 +0000 Subject: [PATCH] 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. --- tools/utils/PlatformSetup.hx | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tools/utils/PlatformSetup.hx b/tools/utils/PlatformSetup.hx index 7e2dee07c..5d36f0a34 100644 --- a/tools/utils/PlatformSetup.hx +++ b/tools/utils/PlatformSetup.hx @@ -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)