refactor(ngcc): ensure unlocker process works in mock file-systems (#36989)
Previously the path to the unlocker process was being resolved by the current file-system. In the case that this was a `MockFileSystemWindows` on a non-Windows operating system, this resulted in an incorrect path to the entry-point. Now the path to the entry-point is hand-crafted to avoid being broken by whatever FileSystem is in use. PR Close #36989
This commit is contained in:
parent
7ebf35c5f8
commit
a2b8dc1cfb
|
@ -78,7 +78,7 @@ export class LockFileWithChildProcess implements LockFile {
|
|||
this.logger.level !== undefined ? this.logger.level.toString() : LogLevel.info.toString();
|
||||
const isWindows = process.platform === 'win32';
|
||||
const unlocker = fork(
|
||||
this.fs.resolve(__dirname, './unlocker.js'), [path, logLevel],
|
||||
__dirname + '/unlocker.js', [path, logLevel],
|
||||
{detached: true, stdio: isWindows ? 'pipe' : 'inherit'});
|
||||
if (isWindows) {
|
||||
unlocker.stdout?.on('data', process.stdout.write.bind(process.stdout));
|
||||
|
|
Loading…
Reference in New Issue