gitutil: sanitize root dir on WSL

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-12-15 15:33:10 +01:00
parent 8484fcdd57
commit ac5b3241b1
5 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,14 @@
package gitutil
import (
"os/exec"
"path/filepath"
)
func gitPath(wd string) (string, error) {
return exec.LookPath("git.exe")
}
func sanitizePath(path string) string {
return filepath.ToSlash(filepath.Clean(path))
}