Log the filename when --write is being used

This helps giving a sense of progress when printing a lot of files
This commit is contained in:
Christopher Chedeau committed 2017-01-10 22:09:18 -08:00
1 parent b37e8c4b36
commit 0fdf14dbe6
1 file changed
+4
+4
View File
@@ -32,6 +32,10 @@ if (!filenames.length) {
filenames.forEach(filename => {
fs.readFile(filename, "utf8", (err, input) => {
if (write) {
console.log(file);
}
if (err) {
console.error("Unable to read file: " + filename + "\n" + err);
// Don't exit the process if one file failed