davidraviv / gh-clean-branches

Safely deletes local branches with no upstream and no un-pushed commits
MIT License
177 stars 15 forks source link

Does not work on Windows #23

Closed heaths closed 8 months ago

heaths commented 1 year ago

Describe the bug Running the extension just after installing it shows,

--: line 1: C:\Users\heaths\AppData\Local\GitHub CLI\extensions\gh-clean-branches\gh-clean-branches: cannot execute: required file not found

This appears to be because it requires zsh instead of bash, the latter of which is installed with git and accessible to any callers.

To Reproduce Steps to reproduce the behavior:

  1. Install it this extension on Windows.
  2. Just run it.

Expected behavior Passing with --dry-run should show me watch branches I can delete.

Desktop (please complete the following information):

Additional context I wrote a GitHub CLI extension using script a while back using bash and can repro this same error if I just change the shebang to require zsh.

davidraviv commented 1 year ago

Hi @heaths, Thanks for trying the extension, and for investing the time in trying to improve it. Unfortunately, the extension depends on zsh as mentioned. There was a great work done by @ndom91 in this PR to refactor the code to bash, but it didn't pass tests yet.