Skip to content

Fix Corepack shim and disable it by default - #120

Merged
Mark Phippard (markphip) merged 2 commits into
microsoft:mainfrom
scaryrawr:fix/corepack-enable-shim
Jul 24, 2026
Merged

Fix Corepack shim and disable it by default#120
Mark Phippard (markphip) merged 2 commits into
microsoft:mainfrom
scaryrawr:fix/corepack-enable-shim

Conversation

@scaryrawr

@scaryrawr Mike Wallio (scaryrawr) commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • disable the Corepack authentication shim by default while keeping it available through corepackAlias
  • keep Azure Artifacts authentication available for explicit corepack pnpm and corepack yarn commands when enabled
  • make corepack enable and corepack disable target the real Corepack binary directory instead of the protected feature shim directory
  • preserve caller-provided --install-directory values
  • add regression and default-off coverage and bump the artifacts-helper patch version to 3.1.1

Validation

  • bash -n src/artifacts-helper/install.sh src/artifacts-helper/scripts/corepack test/artifacts-helper/test_auth_wait.sh test/artifacts-helper/test_shim_integration.sh test/artifacts-helper/test_fallback_execution.sh
  • jq empty src/artifacts-helper/devcontainer-feature.json test/artifacts-helper/scenarios.json
  • git diff --check
  • Linux container checks for enable, disable, explicit install directories, and unchanged command passthrough

This prevents the shim from affecting existing Corepack installations by default and fixes the opt-in EACCES failure where Corepack attempted to unlink /usr/local/share/codespace-shims/pnpm.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b8e33be4-7519-4b56-86e6-5b91a3feeb7c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b8e33be4-7519-4b56-86e6-5b91a3feeb7c
@scaryrawr Mike Wallio (scaryrawr) changed the title Fix Corepack enable through artifact shim Fix Corepack shim and disable it by default Jul 24, 2026
@scaryrawr

Copy link
Copy Markdown
Member Author

Mark Phippard (@markphip) sorry for all the noise 😓. I ran into issues with corepack pnpm install not authing for the package feed, but then didn't realize adding the corepack shim would break how corepack enable pnpm functions.

This fixes the look up for where corepack does its own shims.

This also disables the corepack shim by default now.

@markphip
Mark Phippard (markphip) merged commit 7ae2f14 into microsoft:main Jul 24, 2026
6 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.

2 participants