@@ -119,7 +119,7 @@ Object.defineProperty(exports, 'opensslCli', {get: function() {
119119 opensslCli = path . join ( path . dirname ( process . execPath ) , 'openssl-cli' ) ;
120120 }
121121
122- if ( process . platform === 'win32' ) opensslCli += '.exe' ;
122+ if ( exports . isWindows ) opensslCli += '.exe' ;
123123
124124 var openssl_cmd = child_process . spawnSync ( opensslCli , [ 'version' ] ) ;
125125 if ( openssl_cmd . status !== 0 || openssl_cmd . error !== undefined ) {
@@ -133,7 +133,7 @@ Object.defineProperty(exports, 'hasCrypto', {get: function() {
133133 return process . versions . openssl ? true : false ;
134134} } ) ;
135135
136- if ( process . platform === 'win32' ) {
136+ if ( exports . isWindows ) {
137137 exports . PIPE = '\\\\.\\pipe\\libuv-test' ;
138138} else {
139139 exports . PIPE = exports . tmpDir + '/test.sock' ;
@@ -150,7 +150,7 @@ if (process.env.NODE_COMMON_PIPE) {
150150 }
151151}
152152
153- if ( process . platform === 'win32' ) {
153+ if ( exports . isWindows ) {
154154 exports . faketimeCli = false ;
155155} else {
156156 exports . faketimeCli = path . join ( __dirname , '..' , 'tools' , 'faketime' , 'src' ,
@@ -183,7 +183,7 @@ exports.indirectInstanceOf = function(obj, cls) {
183183
184184
185185exports . ddCommand = function ( filename , kilobytes ) {
186- if ( process . platform === 'win32' ) {
186+ if ( exports . isWindows ) {
187187 var p = path . resolve ( exports . fixturesDir , 'create-file.js' ) ;
188188 return '"' + process . argv [ 0 ] + '" "' + p + '" "' +
189189 filename + '" ' + ( kilobytes * 1024 ) ;
@@ -196,7 +196,7 @@ exports.ddCommand = function(filename, kilobytes) {
196196exports . spawnCat = function ( options ) {
197197 var spawn = require ( 'child_process' ) . spawn ;
198198
199- if ( process . platform === 'win32' ) {
199+ if ( exports . isWindows ) {
200200 return spawn ( 'more' , [ ] , options ) ;
201201 } else {
202202 return spawn ( 'cat' , [ ] , options ) ;
@@ -207,7 +207,7 @@ exports.spawnCat = function(options) {
207207exports . spawnSyncCat = function ( options ) {
208208 var spawnSync = require ( 'child_process' ) . spawnSync ;
209209
210- if ( process . platform === 'win32' ) {
210+ if ( exports . isWindows ) {
211211 return spawnSync ( 'more' , [ ] , options ) ;
212212 } else {
213213 return spawnSync ( 'cat' , [ ] , options ) ;
@@ -218,7 +218,7 @@ exports.spawnSyncCat = function(options) {
218218exports . spawnPwd = function ( options ) {
219219 var spawn = require ( 'child_process' ) . spawn ;
220220
221- if ( process . platform === 'win32' ) {
221+ if ( exports . isWindows ) {
222222 return spawn ( 'cmd.exe' , [ '/c' , 'cd' ] , options ) ;
223223 } else {
224224 return spawn ( 'pwd' , [ ] , options ) ;
@@ -374,7 +374,7 @@ exports.checkSpawnSyncRet = function(ret) {
374374} ;
375375
376376var etcServicesFileName = path . join ( '/etc' , 'services' ) ;
377- if ( process . platform === 'win32' ) {
377+ if ( exports . isWindows ) {
378378 etcServicesFileName = path . join ( process . env . SystemRoot , 'System32' , 'drivers' ,
379379 'etc' , 'services' ) ;
380380}
0 commit comments