[BUG] `drop-sudo` fails when Node is outside sudo's PATH
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
The action fails on our self-hosted Linux runner with safety-strategy: drop-sudo:
sudo: node: command not found
The action installs Node successfully through actions/setup-node. However, src/dropSudo.ts then invokes:
sudo -n node .../dist/main.js drop-sudo --root-phase --user runner --group sudo
Sudo cannot find Node through its executable search path. The step fails before codex exec starts.
Action revision: 52fe01ec70a42f454c9d2ebd47598f9fd6893d56 (v1.11)
Codex version: 0.149.0
Node version: 24.21.0
Expected behavior: the action uses the available Node executable when it invokes its privileged setup phase.
Suggested fix: replace "node" with process.execPath in the sudo argument list. This avoids dependence on sudo's PATH.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/dropSudo.ts at lines 48-52 and inspect the privileged setup invocation and available Node executable. Reproduce the action on a self-hosted Linux runner where Node is outside sudo's PATH. Done means the drop-sudo phase completes and codex exec starts without the sudo: node: command not found error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100