File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
5555 . toLowerCase ( )
5656 . replace ( / _ ( [ a - z ] ) / g, function ( _ , k ) { return k . toUpperCase ( ) } ) ;
5757
58+ console . log ( 'key' , key ) ;
59+
5860 // coerce string value into JS value
5961 var val = process . env [ key ] ;
6062 if ( / ^ ( y e s | o n | t r u e | e n a b l e d ) $ / i. test ( val ) ) val = true ;
@@ -113,8 +115,15 @@ function formatArgs(args) {
113115 args [ 0 ] = prefix + args [ 0 ] . split ( '\n' ) . join ( '\n' + prefix ) ;
114116 args . push ( colorCode + 'm+' + exports . humanize ( this . diff ) + '\u001b[0m' ) ;
115117 } else {
116- args [ 0 ] = new Date ( ) . toISOString ( )
117- + ' ' + name + ' ' + args [ 0 ] ;
118+ args [ 0 ] = getDate ( ) + name + ' ' + args [ 0 ] ;
119+ }
120+ }
121+
122+ function getDate ( ) {
123+ if ( 'hideTtyDate' in this . inspectOpts && this . inspectOpts . hideTtyDate ) {
124+ return '' ;
125+ } else {
126+ return new Date ( ) . toISOString ( ) + ' ' ;
118127 }
119128}
120129
You can’t perform that action at this time.
0 commit comments