adjust console log message if only verifying, if copied actually happened

This commit is contained in:
Ashley Engelund (weedySeaDragon @ github) 2022-09-05 18:36:17 -07:00
parent 703b7eb91d
commit d38f0e9e03
1 changed files with 8 additions and 1 deletions

View File

@ -49,11 +49,18 @@ const verifyAndCopy = (file: string, content?: string) => {
// Files are same, skip.
return;
}
console.log(`File changed: ${outFile}`);
let changeMsg = 'changed';
if (verifyOnly) {
changeMsg = 'to be changed';
}
let logMsg = ` File ${changeMsg}: ${outFile}`
filesWereChanged = true;
if (!verifyOnly) {
writeFileSync(outFile, newBuffer);
logMsg += ' ...and copied to /docs'
}
console.log(logMsg);
};
/**