StacklokLabs / StacklokLabs/toolhive-actions

Windows: PowerShell PATH issue prevents thv command recognition

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted windows
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

  1. Installation completes successfully
  2. Binary is placed in /c/Users/runneradmin/.toolhive/bin/thv.exe
  3. PATH is updated via $GITHUB_PATH and $GITHUB_ENV
  4. Git Bash can execute thv commands
  5. 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:

  1. Using shell: bash in their workflow steps
  2. 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

  1. Investigate using [Environment]::SetEnvironmentVariable() for PowerShell
  2. Add explicit PowerShell PATH manipulation
  3. Provide Windows-specific installation steps
  4. Document the limitation and recommend bash shell usage

Related

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.