Skip to content

Commit

Permalink
tweak: ensure we do not auto-enable analytics when the first command …
Browse files Browse the repository at this point in the history
…run is "diez analytics off"
  • Loading branch information
gumptious committed Nov 14, 2019
1 parent 86c7cd1 commit 966df02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli-core/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const bootstrap = async (rootPackageName = global.process.cwd(), bootstra
export const run = async (bootstrapRoot?: string) => {
const analyticsEnabled = await Registry.get('analyticsEnabled');
global.doNotTrack = !analyticsEnabled;
if (analyticsEnabled === undefined) {
if (analyticsEnabled === undefined && !process.argv.includes('analytics')) {
console.log(chalk.underline('Anonymous aggregate analytics:'));
info(`
Diez collects diagnostic and usage data each time you use the CLI using an
Expand Down

0 comments on commit 966df02

Please sign in to comment.