Skip to content

Check common install locations before installing runpodctl#9

Open
max4c wants to merge 1 commit intomainfrom
fix/runpodctl-install-detection
Open

Check common install locations before installing runpodctl#9
max4c wants to merge 1 commit intomainfrom
fix/runpodctl-install-detection

Conversation

@max4c
Copy link
Copy Markdown
Contributor

@max4c max4c commented Mar 15, 2026

Summary

  • Adds a detection step to runpodctl/SKILL.md that checks ~/.local/bin and ~/bin before attempting a fresh install
  • Fixes an issue where agents would reinstall runpodctl because which runpodctl fails when the binary is installed outside of PATH (e.g. via the manual tar.gz method)
  • Shows how to add the install directory to PATH if the binary is found but not accessible

Context

Ran into this firsthand — runpodctl was installed at ~/bin/runpodctl but the agent couldn't find it with which, so it went through the entire install flow again unnecessarily.

Test plan

  • Verify the detection snippet finds runpodctl in ~/.local/bin and ~/bin
  • Verify agents skip the install step when runpodctl is already present

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread runpodctl/SKILL.md

```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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread runpodctl/SKILL.md

```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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@TimPietruskyRunPod
Copy link
Copy Markdown
Member

hey @max4c — thanks for the pr! before we move forward, a few questions:

  • what specific problem did you run into? was there a project where an agent kept reinstalling runpodctl even though it was already there?
  • which agent/environment was this in? (claude code, codex, something else?)
  • how did runpodctl end up in ~/bin instead of /usr/local/bin or ~/.local/bin? the official installer (curl -sSL https://cli.runpod.net | bash) puts it in /usr/local/bin which is always on PATH, and the skill's manual install instructions use ~/.local/bin.

asking because the official install path + runpodctl doctor should handle everything out of the box. if there's a real gap we want to fix it properly, but adding detection for non-standard locations might be papering over a different root cause.

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