Copy over .sh scripts in git extension too#299396
Conversation
Fixes microsoft#299332 Restoring previous webpack behavior. In the future let's consider just moving these to the `git/scripts` folder so we don't have to copy them around
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @lszomoruMatched files:
|
Same root cause as microsoft#299396 but only caused the icon to be missing so not critical
There was a problem hiding this comment.
Pull request overview
Restores prior webpack behavior for the built-in Git extension by ensuring non-TypeScript assets (notably the *.sh askpass/git-editor scripts under extensions/git/src/) are copied into the built dist/ output so runtime references don’t break (e.g., in VS Code Server / Remote scenarios).
Changes:
- Added a post-build step to copy non-
.tsfiles fromsrc/intodist/. - Wired the post-build copy step into the shared
esbuild-extension-common.mtsrun()callback.
| async function copyNonTsFiles(outDir: string): Promise<void> { | ||
| const entries = await fs.readdir(srcDir, { withFileTypes: true, recursive: true }); |
There was a problem hiding this comment.
copyNonTsFiles(outDir: string) shadows the top-level outDir constant, which makes it easy to misread which value is being used (especially once --outputRoot rewrites the output directory). Consider renaming the function parameter (e.g. resolvedOutDir) to avoid shadowing and improve readability.
Fixes #299332
Restoring previous webpack behavior. In the future let's consider just moving these to the
git/scriptsfolder so we don't have to copy them aroundDouble checked and I think git is the only extension that needs this