Skip to content

Fix "sushi" CI job by avoiding self-overwrite corruption in _updatePublisher.sh - #6

Draft
bvdh with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-sushi-action-failure
Draft

bvdh with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-sushi-action-failure

Conversation

Copilot AI commented Sep 3, 2026 •

Copy link
Copy Markdown

The sushi validate job (check run 100633579979) was failing at sudo nvm install 22 since nvm is a shell function, not a system command, and can't be invoked via sudo.

Findings

  • The reported nvm failure was already fixed on top of this branch by a prior commit switching to sudo npm install -g fsh-sushi.
  • Tracing later CI runs showed the same sushi job still failing, now in the "Update publisher" step, with garbled errors like line 145: i: command not found.
  • Root cause: _updatePublisher.sh downloads a fresh copy of itself and overwrites its own file in place while bash is still executing it, corrupting bash's read buffer mid-script. Reproduced this exact corruption pattern locally with a minimal self-modifying script repro.

Fix

  • Run the script from a copied path so the file bash actively reads is never the one being overwritten, while it still updates ./_updatePublisher.sh in the working directory as intended:
- name: Update publisher
  run: cp _updatePublisher.sh /tmp/_updatePublisher.sh && bash /tmp/_updatePublisher.sh -f -y

Co-authored-by: bvdh <11520802+bvdh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job sushi Fix "sushi" CI job by avoiding self-overwrite corruption in _updatePublisher.sh Sep 3, 2026
Copilot AI requested a review from bvdh September 3, 2026 11:45
Co-authored-by: bvdh <11520802+bvdh@users.noreply.github.com>
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