mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
gitutil: sanitize root dir on WSL
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
14
util/gitutil/path_windows.go
Normal file
14
util/gitutil/path_windows.go
Normal 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))
|
||||
}
|
Reference in New Issue
Block a user