File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { Duplex } from 'stream';
5
5
import unzipper from 'unzipper' ;
6
6
import fs from 'fs-extra' ;
7
7
import path from 'path' ;
8
+ import { fileURLToPath } from 'url' ;
8
9
import { ApiSearch } from './ApiSearch.js' ;
9
10
10
11
/** @typedef {import('child_process').ChildProcess } ChildProcess */
@@ -134,8 +135,8 @@ export class AmfParser {
134
135
execArgv : [ ] ,
135
136
env
136
137
} ;
137
- const processDir = import . meta. url . replace ( 'AmfParser.js' , '' ) . replace ( 'file: ', '' ) ;
138
- const proc = fork ( ` ${ processDir } / ParserProcess.js` , options ) ;
138
+ const processDir = fileURLToPath ( import . meta. url ) . replace ( 'AmfParser.js' , '' ) ;
139
+ const proc = fork ( path . join ( processDir , ' ParserProcess.js' ) , options ) ;
139
140
// the very first message from the child process is that the process started
140
141
// and is ready to receive data.
141
142
proc . once ( 'message' , ( ) => {
You can’t perform that action at this time.
0 commit comments