From e05635b84f99886970b27c675b0d6e08a7314dc0 Mon Sep 17 00:00:00 2001 From: Hugo Montero Date: Tue, 4 Feb 2025 17:08:43 -0600 Subject: [PATCH] wip: prevent ask questions on load-config flag --- src/cmd/setup-tachyon.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/cmd/setup-tachyon.js b/src/cmd/setup-tachyon.js index cf6acc201..24f5e5701 100644 --- a/src/cmd/setup-tachyon.js +++ b/src/cmd/setup-tachyon.js @@ -46,7 +46,7 @@ module.exports = class SetupTachyonCommands extends CLICommandBase { version = 'latest'; //await this._selectVersion(); } - let config = { systemPassword: null, wifi: null, sshPublicKey: null }; + let config = { systemPassword: null, wifi: null, sshPublicKey: null, productId: null }; let alwaysCleanCache = false; if ( !loadConfig ) { @@ -62,20 +62,21 @@ module.exports = class SetupTachyonCommands extends CLICommandBase { () => this._userConfiguration(), 0 ); + const product = await this._runStepWithTiming( + `Next, let's select a Particle organization that you are part of.${os.EOL}` + + `This organization will help manage the Tachyon device and keep things organized.${os.EOL}${os.EOL}` + + "Once you've selected an organization, you can then choose which product the device will belong to.", + 3, + () => this._selectProduct() + ); } else { alwaysCleanCache = true; this.ui.write( - `${os.EOL}${os.EOL}Skipping to Step 3 - Using configuration file: ` + loadConfig + `${os.EOL}` + `${os.EOL}${os.EOL}Skipping to Step 4 - Using configuration file: ` + loadConfig + `${os.EOL}` ); } - const product = await this._runStepWithTiming( - `Next, let's select a Particle organization that you are part of.${os.EOL}` + - `This organization will help manage the Tachyon device and keep things organized.${os.EOL}${os.EOL}` + - "Once you've selected an organization, you can then choose which product the device will belong to.", - 3, - () => this._selectProduct() - ); + const packagePath = await this._runStepWithTiming( `Next, we'll download the Tachyon Operating System image.${os.EOL}` +