Skip to content

Commit 16cd34a

Browse files
committed
Fixing noWrap param not being set dynamically
1 parent fb872b5 commit 16cd34a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

bin/helpers/sync/syncSpecsLogs.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ let specSummary = {
1313
"specs": [],
1414
"duration": null
1515
}
16-
let noWrap = (process.env.SYNC_NO_WRAP && (process.env.SYNC_NO_WRAP === 'true'));
16+
let noWrap = false;
1717
let terminalWidth = (process.stdout.columns) * 0.9;
1818
let lineSeparator = "\n" + "-".repeat(terminalWidth);
19-
// Do not show the separator based on terminal width if no-wrap provided.
20-
if (noWrap) {
21-
lineSeparator = "\n--------------------------------------------------------------------------------";
22-
}
2319

2420
let getOptions = (auth, build_id) => {
2521
return {
@@ -84,7 +80,16 @@ let getBorderConfig = () => {
8480
}
8581
}
8682

83+
let setNoWrapParams = () => {
84+
noWrap = (process.env.SYNC_NO_WRAP && (process.env.SYNC_NO_WRAP === 'true'));
85+
// Do not show the separator based on terminal width if no-wrap provided.
86+
if (noWrap) {
87+
lineSeparator = "\n--------------------------------------------------------------------------------";
88+
}
89+
};
90+
8791
let printSpecsStatus = (bsConfig, buildDetails) => {
92+
setNoWrapParams();
8893
return new Promise((resolve, reject) => {
8994
options = getOptions(bsConfig.auth, buildDetails.build_id)
9095
tableConfig = getTableConfig();

bin/helpers/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ exports.setHeaded = (bsConfig, args) => {
572572
};
573573

574574
exports.setNoWrap = (_bsConfig, args) => {
575-
if (args.noWrap === true) {
575+
if (args.noWrap === true || this.searchForOption('--no-wrap')) {
576576
process.env.SYNC_NO_WRAP = true;
577577
} else {
578578
process.env.SYNC_NO_WRAP = false;

0 commit comments

Comments
 (0)