Extensions using bash scripts do not work on cygwin.
Describe the bug
Some extentions (for example kawarimidoll/gh-graph) use bash scripts to run. Of course, by default these cannot be run on windows.
Cygwin can be thought to solve this problem
version:
gh version 2.14.7-3-g665e4e34 (2022-08-31)
https://github.com/cli/cli/releases/latest
Steps to reproduce the behavior
- Try running a extension using bash scripts on windows (for example
gh graph) - Fail
Expected vs actual behavior
Expected
The extention working.
Actual
Does not work.
Logs
--: C:\Users\<User>\AppData\Local\GitHub CLI\extensions\gh-graph\gh-graph: command not found
Extra notes:
Converting the path to a proper unix path (~/AppData/Local/GitHub\ CLI/extensions/gh-graph/gh-graph in this case) allows the file to be ran under cygwin.
Hi, thank you for reporting.
Of course, by default these cannot be run on windows.
Cygwin aside, bash-based gh extensions can run on Windows proper inside Command Prompt or Powershell terminals if Git for Windows is installed. Git for Windows includes a bash interpreter that gh extensions use, and we assume that most Windows users who use GitHub probably have Git for Windows installed.
Our project does not see much use from Cygwin and that's why we don't test our tool under that environment. These days, developers on Windows who need to use a UNIX-like environment use WSL instead.
Weird that it would work in git bash, but not on cygwin... maybe the the reason for the issue is me using fish instead of bash?
Weird... it does work with git bash, but not on cygwin bash...
Though I got a slightly malformed output.
Oh, also works with method 2 now, so nice. Probably didn't restart the shell host or smth 🤷♀️
Is the issue now gone for you?
If I'm using cmd or git bash, yes. But not in cygwin. I'll edit the issue to reflect this.
Edit: done