File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,12 @@ function BinWrapper(opts) {
2020 }
2121
2222 this . opts = opts || { } ;
23- this . opts . strip = this . opts . strip <= 0 ? 0 : ! this . opts . strip ? 1 : this . opts . strip ;
23+
24+ if ( this . opts . strip <= 0 || ! this . opts . strip ) {
25+ this . opts . strip = 0 ;
26+ } else if ( ! this . opts . strip ) {
27+ this . opts . strip = 1 ;
28+ }
2429}
2530
2631module . exports = BinWrapper ;
@@ -157,7 +162,8 @@ BinWrapper.prototype.runCheck = function (cmd, cb) {
157162 }
158163
159164 if ( this . version ( ) ) {
160- return binVersionCheck ( ) ( this . path ( ) , this . version ( ) , cb ) ;
165+ binVersionCheck ( ) ( this . path ( ) , this . version ( ) , cb ) ;
166+ return ;
161167 }
162168
163169 cb ( ) ;
Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ test('expose a constructor', function (t) {
1313 t . assert ( typeof BinWrapper === 'function' ) ;
1414} ) ;
1515
16- test ( 'return an instance if it called without `new`' , function ( t ) {
17- t . plan ( 1 ) ;
18- t . assert ( BinWrapper ( ) instanceof BinWrapper ) ;
19- } ) ;
20-
2116test ( 'add a source' , function ( t ) {
2217 t . plan ( 1 ) ;
2318
You can’t perform that action at this time.
0 commit comments