Skip to content

Commit

Permalink
wip: prevent ask questions on load-config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed Feb 4, 2025
1 parent 7e5adb4 commit e05635b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/cmd/setup-tachyon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand All @@ -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}` +
Expand Down

0 comments on commit e05635b

Please sign in to comment.