mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 13:37:08 +08:00
gitutil: sanitize root dir on WSL
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@ -66,7 +66,11 @@ func (c *Git) IsDirty() bool {
|
||||
}
|
||||
|
||||
func (c *Git) RootDir() (string, error) {
|
||||
return c.clean(c.run("rev-parse", "--show-toplevel"))
|
||||
root, err := c.clean(c.run("rev-parse", "--show-toplevel"))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return sanitizePath(root), nil
|
||||
}
|
||||
|
||||
func (c *Git) GitDir() (string, error) {
|
||||
|
Reference in New Issue
Block a user