File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ const syncCLI = {
5
5
LOGS : {
6
6
INIT_LOG : "All tests:"
7
7
} ,
8
- INITIAL_DELAY_MULTIPLIER : 10
8
+ INITIAL_DELAY_MULTIPLIER : 10 ,
9
+ DEFAULT_LINE_SEP : "\n--------------------------------------------------------------------------------" ,
9
10
} ;
10
11
11
12
const userMessages = {
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ let specSummary = {
15
15
}
16
16
let noWrap = false ;
17
17
let terminalWidth = ( process . stdout . columns ) * 0.9 ;
18
- let lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
18
+ let lineSeparator = Constants . syncCLI . DEFAULT_LINE_SEP ;
19
+ if ( ! utils . isUndefined ( terminalWidth ) ) lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
19
20
20
21
let getOptions = ( auth , build_id ) => {
21
22
return {
@@ -38,7 +39,7 @@ let getTableConfig = () => {
38
39
colWidth = Math . floor ( terminalWidth * 0.2 ) ;
39
40
40
41
// Do not autosize on terminal's width if no-wrap provided
41
- if ( noWrap ) {
42
+ if ( noWrap || utils . isUndefined ( terminalWidth ) ) {
42
43
centerWidth = 1 ;
43
44
leftWidth = 100 ;
44
45
colWidth = 30 ;
@@ -84,7 +85,7 @@ let setNoWrapParams = () => {
84
85
noWrap = ( process . env . SYNC_NO_WRAP && ( process . env . SYNC_NO_WRAP === 'true' ) ) ;
85
86
// Do not show the separator based on terminal width if no-wrap provided.
86
87
if ( noWrap ) {
87
- lineSeparator = "\n--------------------------------------------------------------------------------" ;
88
+ lineSeparator = Constants . syncCLI . DEFAULT_LINE_SEP ;
88
89
}
89
90
} ;
90
91
You can’t perform that action at this time.
0 commit comments