Skip to content

Copy over .sh scripts in git extension too#299396

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/significant-moose
Mar 5, 2026
Merged

Copy over .sh scripts in git extension too#299396
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/significant-moose

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Mar 5, 2026

Fixes #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

Double checked and I think git is the only extension that needs this

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
Copilot AI review requested due to automatic review settings March 5, 2026 07:10
@mjbvz mjbvz added this to the 1.111.0 milestone Mar 5, 2026
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@lszomoru

Matched files:

  • extensions/git/esbuild.mts

@mjbvz mjbvz enabled auto-merge March 5, 2026 07:11
mjbvz added a commit to mjbvz/vscode that referenced this pull request Mar 5, 2026
Same root cause as microsoft#299396 but only caused the icon to be missing so not critical
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-.ts files from src/ into dist/.
  • Wired the post-build copy step into the shared esbuild-extension-common.mts run() callback.

Comment on lines +12 to +13
async function copyNonTsFiles(outDir: string): Promise<void> {
const entries = await fs.readdir(srcDir, { withFileTypes: true, recursive: true });
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@mjbvz mjbvz merged commit 5cecdad into microsoft:main Mar 5, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors about missing scripts in latest Insiders build

3 participants