Log the filename when --write is being used

This helps giving a sense of progress when printing a lot of files
master
Christopher Chedeau 2017-01-10 22:00:19 -08:00
parent b37e8c4b36
commit 0fdf14dbe6
1 changed files with 4 additions and 0 deletions

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