StacklokLabs / StacklokLabs/toolhive-actions
Windows: PowerShell PATH issue prevents thv command recognition
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 3
- Forks
- 1
- Avg merge
- 17m
- Merged PRs (30d)
- 2
Description
Problem Description
The Toolhive CLI (thv) is successfully installed on Windows runners but is not recognized in PowerShell environments, even though it works correctly in Git Bash.
Current Behavior
- Installation completes successfully
- Binary is placed in
/c/Users/runneradmin/.toolhive/bin/thv.exe - PATH is updated via
$GITHUB_PATHand$GITHUB_ENV - Git Bash can execute
thvcommands - PowerShell fails with: "The term 'thv' is not recognized as a name of a cmdlet, function, script file, or executable program"
Expected Behavior
The thv command should be available in all shells after installation, including PowerShell.
Workarounds
Users can currently work around this issue by:
- Using
shell: bashin their workflow steps - Referencing the full path to the binary:
${{ steps.install.outputs.path }}
Technical Details
- The issue appears to be related to how GitHub Actions handles PATH updates between different shells
- The PATH environment variable is set correctly but PowerShell doesn't pick it up in the same workflow step
Test Logs
PATH: /c/Users/runneradmin/.toolhive/bin:/mingw64/bin:/usr/bin:...
thv: The term 'thv' is not recognized as a name of a cmdlet, function, script file, or executable program.
Potential Solutions
- Investigate using
[Environment]::SetEnvironmentVariable()for PowerShell - Add explicit PowerShell PATH manipulation
- Provide Windows-specific installation steps
- Document the limitation and recommend bash shell usage
Related
Contributor guide
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 with the installation step and the linked CI run, comparing the PATH visible to Git Bash with the PATH visible to PowerShell. Investigate how the action writes $GITHUB_PATH and $GITHUB_ENV; done means the installed thv command runs in PowerShell as well as Git Bash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, powershell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100