Skip to content

Commit f17ec02

Browse files
committed
wrapping the spec name only if --no-wrap passed
1 parent 1662800 commit f17ec02

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bin/helpers/sync/syncSpecsLogs.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let specSummary = {
1313
"specs": [],
1414
"duration": null
1515
}
16+
let noWrap = utils.searchForOption('--no-wrap')
1617
let terminalWidth = (process.stdout.columns) * 0.9;
1718

1819
let getOptions = (auth, build_id) => {
@@ -34,11 +35,11 @@ let getTableConfig = () => {
3435
return {
3536
border: getBorderConfig(),
3637
columns: {
37-
1: {alignment: 'center', width: Math.ceil(terminalWidth * 0.01)},
38-
2: {alignment: 'left', width: Math.floor(terminalWidth * 0.75)}
38+
1: {alignment: 'center', width: noWrap ? 1 : Math.ceil(terminalWidth * 0.01)},
39+
2: {alignment: 'left', width: noWrap ? 100 : Math.floor(terminalWidth * 0.75)}
3940
},
4041
columnDefault: {
41-
width: Math.floor(terminalWidth * 0.2),
42+
width: noWrap ? 30 : Math.floor(terminalWidth * 0.2),
4243
},
4344
columnCount: 3,
4445
};
@@ -81,7 +82,7 @@ let printSpecsStatus = (bsConfig, buildDetails) => {
8182
whileProcess(callback)
8283
},
8384
function(err, result) { // when loop ends
84-
logger.info("\n" + "-".repeat(terminalWidth))
85+
noWrap ? logger.info("\n--------------------------------------------------------------------------------") : logger.info("\n" + "-".repeat(terminalWidth))
8586
specSummary.duration = endTime - startTime
8687
resolve(specSummary)
8788
}
@@ -139,7 +140,7 @@ let showSpecsStatus = (data) => {
139140

140141
let printInitialLog = () => {
141142
logger.info(`\n${Constants.syncCLI.LOGS.INIT_LOG}`)
142-
logger.info("\n" + "-".repeat(terminalWidth))
143+
noWrap ? logger.info("\n--------------------------------------------------------------------------------") : logger.info("\n" + "-".repeat(terminalWidth))
143144
n = Constants.syncCLI.INITIAL_DELAY_MULTIPLIER
144145
}
145146

0 commit comments

Comments
 (0)