Skip to content

Commit 3bcf785

Browse files
committed
more logging
1 parent d7393d6 commit 3bcf785

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

bin/commands/runs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ module.exports = function run(args, rawArgs) {
532532
utils.setUsageReportingFlag(null, args.disableUsageReporting);
533533
console.log(`now reading using readBsConfigJSON in catch block for validateBstackJson`);
534534
let bsJsonData = utils.readBsConfigJSON(bsConfigPath);
535+
console.log(`checking the type of bsJsonData with main logic: ${typeof bsJsonData}`);
535536
utils.sendUsageReport(bsJsonData, args, err.message, Constants.messageTypes.ERROR, utils.getErrorCodeFromErr(err), null, rawArgs);
536537
process.exitCode = Constants.ERROR_EXIT_CODE;
537538
}).finally(function(){

bin/helpers/utils.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,17 +1522,17 @@ exports.setOtherConfigs = (bsConfig, args) => {
15221522
exports.readBsConfigJSON = (bsConfigPath) => {
15231523
try {
15241524
fs.accessSync(bsConfigPath, fs.constants.R_OK);
1525-
const configContent = fs.readFileSync(bsConfigPath, 'utf-8');
1526-
console.log(`configContent: ${configContent}`);
1527-
try {
1528-
const bsConfig = JSON.parse(configContent);
1529-
const normalizedBsConfig = exports.normalizeTestReportingConfig(bsConfig);
1530-
console.log(`normalizedBsConfig: ${JSON.stringify(normalizedBsConfig)}`);
1531-
return JSON.stringify(normalizedBsConfig);
1532-
} catch (err) {
1533-
logger.error(`Error parsing JSON from ${bsConfigPath}:`, err);
1534-
return configContent;
1535-
}
1525+
return fs.readFileSync(bsConfigPath, 'utf-8');
1526+
// console.log(`configContent: ${configContent}`);
1527+
// try {
1528+
// const bsConfig = JSON.parse(configContent);
1529+
// const normalizedBsConfig = exports.normalizeTestReportingConfig(bsConfig);
1530+
// console.log(`normalizedBsConfig: ${JSON.stringify(normalizedBsConfig)}`);
1531+
// return JSON.stringify(normalizedBsConfig);
1532+
// } catch (err) {
1533+
// logger.error(`Error parsing JSON from ${bsConfigPath}:`, err);
1534+
// return configContent;
1535+
// }
15361536
} catch (err) {
15371537
return null;
15381538
}

0 commit comments

Comments
 (0)