@@ -16,7 +16,7 @@ let specSummary = {
16
16
let noWrap = false ;
17
17
let terminalWidth = ( process . stdout . columns ) * 0.9 ;
18
18
let lineSeparator = Constants . syncCLI . DEFAULT_LINE_SEP ;
19
- if ( ! utils . isUndefined ( terminalWidth ) ) lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
19
+ if ( ! isNaN ( terminalWidth ) ) lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
20
20
21
21
let getOptions = ( auth , build_id ) => {
22
22
return {
@@ -33,13 +33,13 @@ let getOptions = (auth, build_id) => {
33
33
} ;
34
34
}
35
35
36
- let getTableConfig = ( ) => {
37
- let centerWidth = Math . ceil ( terminalWidth * 0.01 ) ,
38
- leftWidth = Math . floor ( terminalWidth * 0.75 ) ,
39
- colWidth = Math . floor ( terminalWidth * 0.2 ) ;
36
+ let getTableConfig = ( termWidth ) => {
37
+ let centerWidth = Math . ceil ( termWidth * 0.01 ) ,
38
+ leftWidth = Math . floor ( termWidth * 0.75 ) ,
39
+ colWidth = Math . floor ( termWidth * 0.2 ) ;
40
40
41
41
// Do not autosize on terminal's width if no-wrap provided
42
- if ( noWrap || utils . isUndefined ( terminalWidth ) ) {
42
+ if ( noWrap || isNaN ( termWidth ) ) {
43
43
centerWidth = 1 ;
44
44
leftWidth = 100 ;
45
45
colWidth = 30 ;
@@ -93,7 +93,7 @@ let printSpecsStatus = (bsConfig, buildDetails) => {
93
93
setNoWrapParams ( ) ;
94
94
return new Promise ( ( resolve , reject ) => {
95
95
options = getOptions ( bsConfig . auth , buildDetails . build_id )
96
- tableConfig = getTableConfig ( ) ;
96
+ tableConfig = getTableConfig ( terminalWidth ) ;
97
97
stream = tableStream ( tableConfig ) ;
98
98
99
99
async . whilst (
0 commit comments