From c15043b7716c12e256fd406c9ed1a7b422be6782 Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Sat, 16 May 2026 02:29:05 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20release=20workflow=20cp=20cwd=20?= =?UTF-8?q?=E2=80=94=20subshell=20isolates=20cd=20so=20cp=20runs=20from=20?= =?UTF-8?q?workspace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.0.2 release run surfaced second bug after npm auth fix landed: cp: cannot create directory 'internal/ui_dist': No such file or directory Root cause: `cd /tmp/workflow-ui-build/ui && npm ci && npx vite build` left the shell at /tmp/workflow-ui-build/ui. The next line's `cp` then tried to write /tmp/workflow-ui-build/ui/internal/ui_dist (no such dir) instead of ${GITHUB_WORKSPACE}/internal/ui_dist. Fix: subshell `( cd ... && ... )` isolates the cd so the parent shell stays at GITHUB_WORKSPACE. This bug was hidden behind the npm 401 in the original v1.0.1 failure; surfaced when v1.0.2 got past the auth gate. Followup: cut v1.0.3 from main after this lands. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02cb589..1a7ba23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,12 @@ jobs: # (fetch of @gocodealone/workflow-ui from npm.pkg.github.com). # Captured failure in workflow-plugin-admin#13 v1.0.1 release run. echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > /tmp/workflow-ui-build/ui/.npmrc - cd /tmp/workflow-ui-build/ui && npm ci && npx vite build + # Subshell isolates `cd` so the cp below runs from the repo workspace, + # not /tmp/workflow-ui-build/ui. v1.0.2 release run surfaced this: + # cd persisted across bash lines → cp tried to write + # /tmp/workflow-ui-build/ui/internal/ui_dist (no such dir) instead of + # ${GITHUB_WORKSPACE}/internal/ui_dist. + ( cd /tmp/workflow-ui-build/ui && npm ci && npx vite build ) rm -rf internal/ui_dist && cp -r /tmp/workflow-ui-build/ui/dist internal/ui_dist rm -rf /tmp/workflow-ui-build