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_PATH and $GITHUB_ENV
- Git Bash can execute
thv commands
- 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: bash in 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
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
/c/Users/runneradmin/.toolhive/bin/thv.exe$GITHUB_PATHand$GITHUB_ENVthvcommandsExpected Behavior
The
thvcommand should be available in all shells after installation, including PowerShell.Workarounds
Users can currently work around this issue by:
shell: bashin their workflow steps${{ steps.install.outputs.path }}Technical Details
Test Logs
Potential Solutions
[Environment]::SetEnvironmentVariable()for PowerShellRelated