mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +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);
|
||||
|
||||
if (
|
||||
packageObj.strapi &&
|
||||
packageObj.strapi.uuid &&
|
||||
packageObj.strapi.telemetryDisabled === false
|
||||
) {
|
||||
console.log(`${chalk.yellow('Warning:')} telemetry is already enabled`);
|
||||
process.exit(0);
|
||||
if (packageObj.strapi && packageObj.strapi.uuid) {
|
||||
if (packageObj.strapi.telemetryDisabled === false) {
|
||||
console.log(`${chalk.yellow('Warning:')} telemetry is already enabled`);
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
const updatedPackageJSON = generateNewPackageJSON(packageObj);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user