From 025c60641889c1a4fb57007d93a17613dd84e392 Mon Sep 17 00:00:00 2001 From: Claudio Nicora Date: Wed, 30 Aug 2023 00:00:04 +0200 Subject: [PATCH] fix(cli): "open" command does not need to show device selector if only one is available (as like capacitor does) --- packages/@ionic/cli/src/commands/capacitor/run.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@ionic/cli/src/commands/capacitor/run.ts b/packages/@ionic/cli/src/commands/capacitor/run.ts index 0398a6e90..e78b2149e 100644 --- a/packages/@ionic/cli/src/commands/capacitor/run.ts +++ b/packages/@ionic/cli/src/commands/capacitor/run.ts @@ -205,7 +205,9 @@ For Android and iOS, you can setup Remote Debugging on your device with browser ); } } else { - if (targets.length > 0) { + if (targets.length === 1) { + options['target'] = targets[0].id; + } else if (targets.length > 1) { options['target'] = await this.env.prompt({ type: 'list', name: 'target',