cli icon indicating copy to clipboard operation
cli copied to clipboard

Extensions using bash scripts do not work on cygwin.

Open MinekPo1 opened this issue 3 years ago • 6 comments

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

  1. Try running a extension using bash scripts on windows (for example gh graph)
  2. 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.

MinekPo1 avatar Aug 31 '22 20:08 MinekPo1

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.

mislav avatar Sep 07 '22 12:09 mislav

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?

MinekPo1 avatar Sep 07 '22 13:09 MinekPo1

Weird... it does work with git bash, but not on cygwin bash...

Though I got a slightly malformed output.

MinekPo1 avatar Sep 08 '22 21:09 MinekPo1

Oh, also works with method 2 now, so nice. Probably didn't restart the shell host or smth 🤷‍♀️

MinekPo1 avatar Sep 08 '22 21:09 MinekPo1

Is the issue now gone for you?

mislav avatar Sep 09 '22 12:09 mislav

If I'm using cmd or git bash, yes. But not in cygwin. I'll edit the issue to reflect this.

Edit: done

MinekPo1 avatar Sep 09 '22 13:09 MinekPo1