Skip to content

fix(devcontainers-cli): allow yarn to install when packageManager not yarn #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 4, 2025

Conversation

DanielleMaywood
Copy link
Contributor

Description

On our dogfood workspaces, we fail to install @devcontainers/cli with yarn because our agent directory /home/coder/coder contains a package.json with packageManager being set to pnpm. This change instead ensures to run yarn global add inside the $CODER_SCRIPT_DATA_DIR so that we don't read a package.json and cause things to break.

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/coder/modules/devcontainers-cli
New version: v1.0.32
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

None

…ot `yarn`

On our dogfood box, we fail to install `@devcontainers/cli` with `yarn`
because our agent directory `/home/coder/coder` contains a
`package.json` with `packageManager` being set to `pnpm`. This change
instead ensures to run the script inside the `$CODER_SCRIPT_DATA_DIR` so
that we don't read a `package.json` and cause things to break.
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Thanks for fixing! Approved, but I'd suggest changing the cd slightly to avoid side-effects.

@DanielleMaywood DanielleMaywood merged commit 2585918 into main Aug 4, 2025
4 checks passed
@DanielleMaywood DanielleMaywood deleted the danielle/devcontainer-cli-yarn branch August 4, 2025 12:00
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.

3 participants