stefanwille / git-branch-delete

Interactive command line tool that makes it comfortable to delete several Git branches at once.
72 stars 9 forks source link

Tool does not recognize local branches on Windows #5

Closed KamilPacanek closed 2 years ago

KamilPacanek commented 2 years ago

Hi @stefanwille, maybe I got it wrong, but see the output of the tool below. Why didn't it see the local branches? image

Tried both via Node.JS console and Git Bash.

KamilPacanek commented 2 years ago

Ok, I've looked into the code and I see you are splitting output via \n character - which should work fine on Linux, on Windows it won't work - so I've changed code locally (), and it indeed outputs the correct number of branches. I'm going to work things out after the work and do some PR to make it Windows compatible :).

- const lines: string[] = text.split("\n");
+ const lines: string[] = text.split("\r\n");

image