steveukx / git-js

A light weight interface for running git commands in any node.js application.
MIT License
3.53k stars 318 forks source link

custom-binary plugin does not support whitespace #1031

Open skyshineb opened 2 days ago

skyshineb commented 2 days ago

I've recently stuck with error on other project using this plugin. I have git installed on Windows in C:\Program Files\Git with respective binary path C:\Program Files\Git\bin\git.exe and when SimpleGit is instantiated it receives this path as custom binary. But it will not pass the Regex check ^([a-z]:)?([a-z0-9/.\\_-]+)$ in simple-git/src/lib/plugins/custom-binary.plugin.ts because it does not contain whitespace nor ~(to use with shorten windows path).

Can someone explain to me why this is desired behavior or maybe it's a bug?

skyshineb commented 2 days ago

@steveukx Hi! Can you please take a look?