@@ -16,7 +16,7 @@ let specSummary = {
1616let noWrap = false ;
1717let terminalWidth = ( process . stdout . columns ) * 0.9 ;
1818let lineSeparator = Constants . syncCLI . DEFAULT_LINE_SEP ;
19- if ( ! utils . isUndefined ( terminalWidth ) ) lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
19+ if ( ! isNaN ( terminalWidth ) ) lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
2020
2121let getOptions = ( auth , build_id ) => {
2222 return {
@@ -33,13 +33,13 @@ let getOptions = (auth, build_id) => {
3333 } ;
3434}
3535
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 ) ;
4040
4141 // Do not autosize on terminal's width if no-wrap provided
42- if ( noWrap || utils . isUndefined ( terminalWidth ) ) {
42+ if ( noWrap || isNaN ( termWidth ) ) {
4343 centerWidth = 1 ;
4444 leftWidth = 100 ;
4545 colWidth = 30 ;
@@ -93,7 +93,7 @@ let printSpecsStatus = (bsConfig, buildDetails) => {
9393 setNoWrapParams ( ) ;
9494 return new Promise ( ( resolve , reject ) => {
9595 options = getOptions ( bsConfig . auth , buildDetails . build_id )
96- tableConfig = getTableConfig ( ) ;
96+ tableConfig = getTableConfig ( terminalWidth ) ;
9797 stream = tableStream ( tableConfig ) ;
9898
9999 async . whilst (
0 commit comments