File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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';
55import unzipper from 'unzipper' ;
66import fs from 'fs-extra' ;
77import path from 'path' ;
8+ import { fileURLToPath } from 'url' ;
89import { ApiSearch } from './ApiSearch.js' ;
910
1011/** @typedef {import('child_process').ChildProcess } ChildProcess */
@@ -134,8 +135,8 @@ export class AmfParser {
134135 execArgv : [ ] ,
135136 env
136137 } ;
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 ) ;
139140 // the very first message from the child process is that the process started
140141 // and is ready to receive data.
141142 proc . once ( 'message' , ( ) => {
You can’t perform that action at this time.
0 commit comments