Skip to content

fix: release workflow cp cwd — subshell isolates cd so cp runs from workspace#16

Merged
intel352 merged 1 commit into
mainfrom
fix/release-cp-cwd
May 16, 2026
Merged

fix: release workflow cp cwd — subshell isolates cd so cp runs from workspace#16
intel352 merged 1 commit into
mainfrom
fix/release-cp-cwd

Conversation

@intel352

Copy link
Copy Markdown
Contributor

Summary

Followup to PR #14 / #13. 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 persisted the cwd. The next line's cp ran from /tmp/workflow-ui-build/ui instead 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

  • YAML valid (parens around the cd expression)
  • Post-merge: tag v1.0.3; verify gh release list --repo GoCodeAlone/workflow-plugin-admin shows v1.0.3 draft=false latest=true assets≥4

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings May 16, 2026 06:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 build sequence 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.

@intel352
intel352 merged commit 2e26487 into main May 16, 2026
12 checks passed
@intel352
intel352 deleted the fix/release-cp-cwd branch May 16, 2026 06:38
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