@@ -119,7 +119,7 @@ Object.defineProperty(exports, 'opensslCli', {get: function() {
119
119
opensslCli = path . join ( path . dirname ( process . execPath ) , 'openssl-cli' ) ;
120
120
}
121
121
122
- if ( process . platform === 'win32' ) opensslCli += '.exe' ;
122
+ if ( exports . isWindows ) opensslCli += '.exe' ;
123
123
124
124
var openssl_cmd = child_process . spawnSync ( opensslCli , [ 'version' ] ) ;
125
125
if ( openssl_cmd . status !== 0 || openssl_cmd . error !== undefined ) {
@@ -133,7 +133,7 @@ Object.defineProperty(exports, 'hasCrypto', {get: function() {
133
133
return process . versions . openssl ? true : false ;
134
134
} } ) ;
135
135
136
- if ( process . platform === 'win32' ) {
136
+ if ( exports . isWindows ) {
137
137
exports . PIPE = '\\\\.\\pipe\\libuv-test' ;
138
138
} else {
139
139
exports . PIPE = exports . tmpDir + '/test.sock' ;
@@ -150,7 +150,7 @@ if (process.env.NODE_COMMON_PIPE) {
150
150
}
151
151
}
152
152
153
- if ( process . platform === 'win32' ) {
153
+ if ( exports . isWindows ) {
154
154
exports . faketimeCli = false ;
155
155
} else {
156
156
exports . faketimeCli = path . join ( __dirname , '..' , 'tools' , 'faketime' , 'src' ,
@@ -183,7 +183,7 @@ exports.indirectInstanceOf = function(obj, cls) {
183
183
184
184
185
185
exports . ddCommand = function ( filename , kilobytes ) {
186
- if ( process . platform === 'win32' ) {
186
+ if ( exports . isWindows ) {
187
187
var p = path . resolve ( exports . fixturesDir , 'create-file.js' ) ;
188
188
return '"' + process . argv [ 0 ] + '" "' + p + '" "' +
189
189
filename + '" ' + ( kilobytes * 1024 ) ;
@@ -196,7 +196,7 @@ exports.ddCommand = function(filename, kilobytes) {
196
196
exports . spawnCat = function ( options ) {
197
197
var spawn = require ( 'child_process' ) . spawn ;
198
198
199
- if ( process . platform === 'win32' ) {
199
+ if ( exports . isWindows ) {
200
200
return spawn ( 'more' , [ ] , options ) ;
201
201
} else {
202
202
return spawn ( 'cat' , [ ] , options ) ;
@@ -207,7 +207,7 @@ exports.spawnCat = function(options) {
207
207
exports . spawnSyncCat = function ( options ) {
208
208
var spawnSync = require ( 'child_process' ) . spawnSync ;
209
209
210
- if ( process . platform === 'win32' ) {
210
+ if ( exports . isWindows ) {
211
211
return spawnSync ( 'more' , [ ] , options ) ;
212
212
} else {
213
213
return spawnSync ( 'cat' , [ ] , options ) ;
@@ -218,7 +218,7 @@ exports.spawnSyncCat = function(options) {
218
218
exports . spawnPwd = function ( options ) {
219
219
var spawn = require ( 'child_process' ) . spawn ;
220
220
221
- if ( process . platform === 'win32' ) {
221
+ if ( exports . isWindows ) {
222
222
return spawn ( 'cmd.exe' , [ '/c' , 'cd' ] , options ) ;
223
223
} else {
224
224
return spawn ( 'pwd' , [ ] , options ) ;
@@ -374,7 +374,7 @@ exports.checkSpawnSyncRet = function(ret) {
374
374
} ;
375
375
376
376
var etcServicesFileName = path . join ( '/etc' , 'services' ) ;
377
- if ( process . platform === 'win32' ) {
377
+ if ( exports . isWindows ) {
378
378
etcServicesFileName = path . join ( process . env . SystemRoot , 'System32' , 'drivers' ,
379
379
'etc' , 'services' ) ;
380
380
}
0 commit comments