fix: cannot open vscode when use vscode-win32-x64 in Windows (#233285)

When executing `npm run gulp vscode-win32-x64` on the Windows platform, the `bundle-vscode` task is triggered. However, this task does not handle the path issues well, resulting in the contents of the `bootstrap-window.js` file not being injected into `workbench.js` and `processExplorer.js`.

The reason why VSCode does not encounter this issue is that the code compilation (compile-build) is performed on a Linux machine, while the Windows machine only executes the application build (vscode-win32-x64-ci will not trigger `bundle-vscode`).

Signed-off-by: Kevin Cui <bh@bugs.cc>
pull/233417/head
Kevin Cui 2024-11-08 21:17:17 +08:00 committed by GitHub
parent c48f21c72c
commit d0d222dee4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ function bundleESMTask(opts) {
newContents = contents;
}
// File Content Mapper
const mapper = opts.fileContentMapper?.(path);
const mapper = opts.fileContentMapper?.(path.replace(/\\/g, '/'));
if (mapper) {
newContents = await mapper(newContents);
}

View File

@ -106,7 +106,7 @@ function bundleESMTask(opts: IBundleESMTaskOpts): NodeJS.ReadWriteStream {
}
// File Content Mapper
const mapper = opts.fileContentMapper?.(path);
const mapper = opts.fileContentMapper?.(path.replace(/\\/g, '/'));
if (mapper) {
newContents = await mapper(newContents);
}