fix: also hide sensitive info when loggin from cli.js

This commit is contained in:
Pierre Vanduynslager
2018-07-30 14:06:51 -04:00
parent b2d82c2ccb
commit 43d0646150
3 changed files with 19 additions and 5 deletions
+1 -3
View File
@@ -7,7 +7,5 @@ module.exports = env => {
);
const regexp = new RegExp(toReplace.map(envVar => escapeRegExp(env[envVar])).join('|'), 'g');
return output => {
return output && toReplace.length > 0 ? output.toString().replace(regexp, SECRET_REPLACEMENT) : output;
};
return output => (output && toReplace.length > 0 ? output.toString().replace(regexp, SECRET_REPLACEMENT) : output);
};