File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -392,17 +392,18 @@ const validation = {
392392 return options ;
393393 }
394394
395- if ( options . windows . filePath ) {
396- options . windows . filePath = helpers . resolveWindowsEnvironmentVariables ( options . windows . filePath ) ;
397- options . windows . filePath = this . resolvePATH ( options . windows . filePath ) ;
395+ let windowsFilePath = options . windows . filePath ;
396+ if ( windowsFilePath ) {
397+ windowsFilePath = helpers . resolveWindowsEnvironmentVariables ( windowsFilePath ) ;
398+ windowsFilePath = this . resolvePATH ( windowsFilePath ) ;
398399 }
399400
400401 if (
401- ! options . windows . filePath ||
402- typeof ( options . windows . filePath ) !== 'string' ||
403- ! fs . existsSync ( options . windows . filePath )
402+ ! windowsFilePath ||
403+ typeof ( windowsFilePath ) !== 'string' ||
404+ ! fs . existsSync ( windowsFilePath )
404405 ) {
405- helpers . throwError ( options , 'WINDOWS filePath does not exist: ' + options . windows . filePath ) ;
406+ helpers . throwError ( options , 'WINDOWS filePath does not exist: ' + windowsFilePath ) ;
406407 delete options . windows ;
407408 }
408409
You can’t perform that action at this time.
0 commit comments