Skip to content

Commit

Permalink
1. Adding check for environment variable DO_NOT_TRACK to disable anal…
Browse files Browse the repository at this point in the history
…ytics
  • Loading branch information
Norman Shipman committed Aug 22, 2023
1 parent ba916b8 commit 5806524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion report.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function logIfVerbose (toLog, stream) {
// SCARF_NO_ANALYTICS was the original variable, we'll get rid of it eventually
const userHasOptedOut = (rootPackage) => {
return (rootPackage && rootPackage.scarfSettings && rootPackage.scarfSettings.enabled === false) ||
(process.env.SCARF_ANALYTICS === 'false' || process.env.SCARF_NO_ANALYTICS === 'true')
(process.env.SCARF_ANALYTICS === 'false' || process.env.SCARF_NO_ANALYTICS === 'true' || process.env.DO_NOT_TRACK === '1')
}

const userHasOptedIn = (rootPackage) => {
Expand Down

0 comments on commit 5806524

Please sign in to comment.