Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function save(callback) {
const csonString = CSON.createCSONString(config);
fs.writeFile('./config.cson', csonString, (error) => {
if (error) {
console.log(chalk.red(error));
console.log(''); // Empty line
callback(error);
return false;
}
callback();
});
}
Details: err,
Errors: [{
Message: err,
FileName: sourceFileName
}]
}));
writer.end();
return;
}
writer.write(JSON.stringify({
Success: true,
SourceFileName: sourceFileName,
TargetFileName: targetFileName,
Remarks: "Successful!",
Content: CSON.createCSONString(data)
}));
writer.end();
};
//#endregion