Skip to content

Commit

Permalink
use type input instead of confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed Feb 5, 2025
1 parent 04cfcf3 commit edaf629
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/cmd/setup-tachyon.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,18 @@ Welcome to the Particle Tachyon setup! This interactive command:
name: 'productName',
message: 'Enter the product name:',
}, {
type: 'confirm',
type: 'input',
name: 'locationOptIn',
message: 'Would you like to opt in to location services? (y/n):',
default: true
default: 'y'
}];
const { productName, locationOptIn } = await this.ui.prompt(question);
const { product } = await this.api.createProduct({ name: productName, platformId, orgSlug, locationOptIn });
const { product } = await this.api.createProduct({
name: productName,
platformId,
orgSlug,
locationOptIn: locationOptIn.toLowerCase() === 'y'
});
this.ui.write(`Product ${product.name} created successfully!`);
return product?.id;
}
Expand Down

0 comments on commit edaf629

Please sign in to comment.