Skip to content

Commit

Permalink
Merge pull request #44 from adobe/PDCL-5086-optional-chaining-fix
Browse files Browse the repository at this point in the history
PDCL-5086: optional chaining is only available in node >= 14, which i…
  • Loading branch information
brenthosie authored Apr 19, 2021
2 parents a6c0141 + 4c71a85 commit f2ac2b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const checkOldProductionEnvironmentVariables = require('./checkOldProductionEnvi
if (argv.verbose) {
require('request-debug')(require('request-promise-native'), function(type, data, r) {
const filteredData = { ...data };
if (filteredData.headers?.Authorization) {
if (filteredData.headers && filteredData.headers.Authorization) {
filteredData.headers.Authorization = 'Bearer [USER_ACCESS_TOKEN]'
}
console.error({ [type]: filteredData })
Expand Down Expand Up @@ -108,6 +108,7 @@ const checkOldProductionEnvironmentVariables = require('./checkOldProductionEnvi
}

console.log(chalk.bold.red(error.message));
console.log(chalk.bold.red('run in --verbose mode for more info'));
process.exitCode = 1;
}
})();

0 comments on commit f2ac2b3

Please sign in to comment.