Skip to content

chore(ci): fix create-cedar-rsc-app yarn install on Windows#1745

Merged
Tobbe merged 2 commits intomainfrom
tobbe-chore-ci-fix-create-cedar-rsc-app-yarn-install-windows
May 11, 2026
Merged

chore(ci): fix create-cedar-rsc-app yarn install on Windows#1745
Tobbe merged 2 commits intomainfrom
tobbe-chore-ci-fix-create-cedar-rsc-app-yarn-install-windows

Conversation

@Tobbe
Copy link
Copy Markdown
Member

@Tobbe Tobbe commented May 10, 2026

Problem

yarn --cwd packages/create-cedar-rsc-app install --inline-builds was failing on Windows runners with exit code 127 (command not found) at the start of the Resolution step.

A guess as to what the root cause might be is that it's a Corepack + Windows issue: when using --cwd to run yarn from a sub-directory that has no packageManager field in its package.json, Corepack possibly can't properly resolve the yarn binary for that directory context.

This was spotted in the Background Jobs E2E test: https://github.com/cedarjs/cedar/actions/runs/25642121026/job/75264311900

Fix

Replace the --cwd invocation with a plain cd + yarn install in the same shell script. Yarn is already active in the shell from the first install, so the second invocation succeeds normally.

Using `yarn --cwd packages/create-cedar-rsc-app install` fails on Windows
with exit code 127 (command not found). Corepack can't resolve the yarn
binary when switching directory context via --cwd for a sub-project that
has no packageManager field.

Replace with a plain `cd` + `yarn install` in the same shell script to
avoid the issue entirely.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 10, 2026

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 0858ad0
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6a0116ead1a56a0008743567

@github-actions github-actions Bot added this to the chore milestone May 10, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 10, 2026

Greptile Summary

This PR fixes a Windows-specific CI failure in the set-up-job composite action where yarn --cwd packages/create-cedar-rsc-app install --inline-builds exited with code 127 (command not found) due to a suspected Corepack + Windows path-resolution issue. The fix replaces the --cwd flag with a shell-level cd to the absolute target directory followed by a plain yarn install.

  • The two-command sequence (yarn install in the working directory, then cd \"$GITHUB_WORKSPACE/packages/create-cedar-rsc-app\" && yarn install) preserves the original intent and is equivalent in result; switching to an absolute path via $GITHUB_WORKSPACE removes any ambiguity about the resolved directory.
  • shell: bash on the step means GitHub Actions runs with -eo pipefail by default, so a failure in either yarn install will still abort the step correctly.

Confidence Score: 5/5

This PR is safe to merge — it makes a minimal, targeted change to a single CI step with no impact on application code or other workflows.

The change swaps a single-line yarn invocation for an equivalent two-command shell sequence. Both the original intent and the error-propagation behavior are preserved, and the absolute path via $GITHUB_WORKSPACE is consistent with how the same variable is already used elsewhere in the action. No production code is touched.

No files require special attention.

Important Files Changed

Filename Overview
.github/actions/set-up-job/action.yml Replaces yarn --cwd invocation with an explicit cd + yarn install to fix Corepack binary resolution on Windows CI runners

Reviews (2): Last reviewed commit: "chore(ci): use $GITHUB_WORKSPACE for abs..." | Re-trigger Greptile

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 10, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 0858ad0

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 4s View ↗
nx run-many -t build ✅ Succeeded 4m 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-11 00:08:20 UTC

@Tobbe Tobbe merged commit 651014a into main May 11, 2026
73 of 75 checks passed
@Tobbe Tobbe deleted the tobbe-chore-ci-fix-create-cedar-rsc-app-yarn-install-windows branch May 11, 2026 00:11
@github-actions
Copy link
Copy Markdown

The changes in this PR are now available on npm.

Try them out by running yarn cedar upgrade -t 5.0.0-canary.2311

Or try it in a new app with yarn dlx create-cedar-app@5.0.0-canary.2311

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.

1 participant