Check common install locations before installing runpodctl#9
Check common install locations before installing runpodctl#9
Conversation
Agents using `which runpodctl` miss binaries installed to ~/bin or ~/.local/bin when those directories aren't in PATH. Added a detection step that checks common locations first and shows how to add them to PATH, avoiding unnecessary reinstalls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af4616aa34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ```bash | ||
| # Check PATH first, then common install locations | ||
| which runpodctl 2>/dev/null || ls ~/.local/bin/runpodctl 2>/dev/null || ls ~/bin/runpodctl 2>/dev/null |
There was a problem hiding this comment.
Verify binary executability before skipping installation
The new probe uses ls ~/.local/bin/runpodctl / ls ~/bin/runpodctl, which returns success for any existing file, not just an executable CLI. In environments where a stale or partially downloaded runpodctl file exists at one of those paths, this check reports success and can cause agents to skip installation, leaving subsequent runpodctl ... commands to fail.
Useful? React with 👍 / 👎.
|
|
||
| ```bash | ||
| # Check PATH first, then common install locations | ||
| which runpodctl 2>/dev/null || ls ~/.local/bin/runpodctl 2>/dev/null || ls ~/bin/runpodctl 2>/dev/null |
There was a problem hiding this comment.
Avoid failing the pre-install probe when tool is missing
This probe exits non-zero when runpodctl is not found in PATH or the two fallback locations (status 2 from the final ls), even though “not installed” is the expected branch. In automation contexts that treat any non-zero probe as a hard failure (for example set -e wrappers or agent command runners), the flow can stop before reaching the install commands.
Useful? React with 👍 / 👎.
|
hey @max4c — thanks for the pr! before we move forward, a few questions:
asking because the official install path + |
Summary
runpodctl/SKILL.mdthat checks~/.local/binand~/binbefore attempting a fresh installwhich runpodctlfails when the binary is installed outside of PATH (e.g. via the manual tar.gz method)Context
Ran into this firsthand — runpodctl was installed at
~/bin/runpodctlbut the agent couldn't find it withwhich, so it went through the entire install flow again unnecessarily.Test plan
~/.local/binand~/bin🤖 Generated with Claude Code