Skip to content

Commit

Permalink
chore: use verbose emit
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed May 22, 2020
1 parent a829304 commit b9b99fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// TODO: Perhaps this should live in cordova-common?

const fs = require('fs-extra');
const { events } = require('cordova-common');

/**
* Reads, searches, and replaces the found occurences with replacementString and then writes the file back out.
Expand All @@ -39,7 +40,7 @@ exports.replaceFileContents = function (file, searchRegex, replacementString) {
try {
contents = fs.readFileSync(file).toString();
} catch (ex) {
console.log('TRYING TO READ: ', file);
events.emit('verbose', `Trying to read file: ${file}`);
throw ex;
}
contents = contents.replace(searchRegex, replacementString);
Expand Down

0 comments on commit b9b99fa

Please sign in to comment.