Skip to content

Commit 45d7d8c

Browse files
committed
fix wait too long even if the device is connected in EDL mode
1 parent 6e4c456 commit 45d7d8c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cmd/setup-tachyon.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ module.exports = class SetupTachyonCommands extends CLICommandBase {
9494
while (edlDevices.length === 0) {
9595
try {
9696
edlDevices = await getEdlDevices();
97-
if (edlDevices.length === 0 && !messageShown) {
97+
if (edlDevices.length > 0) {
98+
break;
99+
}
100+
if (!messageShown) {
98101
const message = `${this.ui.chalk.bold('Before we get started, we need to power on your Tachyon board')}:` +
99102
`${os.EOL}${os.EOL}` +
100103
`1. Plug the USB-C cable into your computer and the Tachyon board.${os.EOL}` +
@@ -111,7 +114,7 @@ module.exports = class SetupTachyonCommands extends CLICommandBase {
111114
await delay(DEVICE_READY_WAIT_TIME);
112115
}
113116
if (messageShown) {
114-
this.ui.stdout.write(`Your device is now in ${this.ui.chalk.bold('system update')} mode!`);
117+
this.ui.stdout.write(`Your device is now in ${this.ui.chalk.bold('system update')} mode!${os.EOL}`);
115118
await delay(1000); // give the user a moment to read the message
116119
}
117120
}

0 commit comments

Comments
 (0)