Skip to content

Commit

Permalink
fix(cli): "open" command does not need to show device selector if onl…
Browse files Browse the repository at this point in the history
…y one is available (as like capacitor does)
  • Loading branch information
nicorac committed Oct 3, 2023
1 parent 0c4cd0f commit 9202251
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@ionic/cli/src/commands/capacitor/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 9202251

Please sign in to comment.