fix: release workflow cp cwd — subshell isolates cd so cp runs from workspace#16
Merged
Conversation
…orkspace
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) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes a release workflow regression where the Build admin UI step’s cd changed the working directory for subsequent lines, causing the cp into internal/ui_dist to run from /tmp/... instead of the repo workspace.
Changes:
- Wraps the
cd /tmp/workflow-ui-build/ui && npm ci && npx vite buildsequence in a subshell so the parent shell’s working directory remains${GITHUB_WORKSPACE}. - Adds inline comments documenting the v1.0.2 failure mode and why the subshell is required.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Followup to PR #14 / #13. v1.0.2 release run surfaced second bug after npm auth fix landed:
Root cause:
cd /tmp/workflow-ui-build/ui && npm ci && npx vite buildpersisted the cwd. The next line'scpran from/tmp/workflow-ui-build/uiinstead of\${GITHUB_WORKSPACE}.Fix: subshell
( cd ... && ... )isolates the cd so the parent shell stays at workspace.This bug was hidden behind the npm 401 in v1.0.1's failure; surfaced when v1.0.2 got past the auth gate.
Followup
After this lands, cut v1.0.3 from main HEAD to re-trigger GoReleaser.
Test plan
gh release list --repo GoCodeAlone/workflow-plugin-adminshows v1.0.3 draft=false latest=true assets≥4🤖 Generated with Claude Code