Skip to content

Commit 0f7bda1

Browse files
authored
Disable source state private check on Windows (#456)
Disable source state private check on Windows
2 parents 688bc14 + 88b48f4 commit 0f7bda1

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

cmd/root.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cmd
33
import (
44
"fmt"
55
"os"
6+
"runtime"
67
"strings"
78

89
"github.com/Masterminds/sprig"
@@ -140,12 +141,15 @@ func (c *Config) persistentPreRunRootE(fs vfs.FS, args []string) error {
140141
case err == nil && !info.IsDir():
141142
return fmt.Errorf("%s: not a directory", c.SourceDir)
142143
case err == nil:
143-
private, err := chezmoi.IsPrivate(fs, c.SourceDir)
144-
if err != nil {
145-
return err
146-
}
147-
if !private {
148-
fmt.Fprintf(os.Stderr, "%s: not private, but should be\n", c.SourceDir)
144+
// FIXME renable private check on Windows
145+
if runtime.GOOS != "windows" {
146+
private, err := chezmoi.IsPrivate(fs, c.SourceDir)
147+
if err != nil {
148+
return err
149+
}
150+
if !private {
151+
fmt.Fprintf(os.Stderr, "%s: not private, but should be\n", c.SourceDir)
152+
}
149153
}
150154
case !os.IsNotExist(err):
151155
return err

0 commit comments

Comments
 (0)