mirror of
https://github.com/strapi/strapi.git
synced 2025-11-15 17:49:57 +00:00
Change logic of the command slightly to make the operation more explicit in case telemetryDisabled is undefined
This commit is contained in:
parent
2cc5037e8a
commit
e1a58c4675
@ -79,13 +79,11 @@ module.exports = async function optInTelemetry() {
|
|||||||
|
|
||||||
const packageObj = await readPackageJSON(packageJSONPath);
|
const packageObj = await readPackageJSON(packageJSONPath);
|
||||||
|
|
||||||
if (
|
if (packageObj.strapi && packageObj.strapi.uuid) {
|
||||||
packageObj.strapi &&
|
if (packageObj.strapi.telemetryDisabled === false) {
|
||||||
packageObj.strapi.uuid &&
|
console.log(`${chalk.yellow('Warning:')} telemetry is already enabled`);
|
||||||
packageObj.strapi.telemetryDisabled === false
|
process.exit(0);
|
||||||
) {
|
}
|
||||||
console.log(`${chalk.yellow('Warning:')} telemetry is already enabled`);
|
|
||||||
process.exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const updatedPackageJSON = generateNewPackageJSON(packageObj);
|
const updatedPackageJSON = generateNewPackageJSON(packageObj);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user