diff --git a/internal/application/scaffold_test.go b/internal/application/scaffold_test.go index 2f5b9f7..157570f 100644 --- a/internal/application/scaffold_test.go +++ b/internal/application/scaffold_test.go @@ -3,6 +3,7 @@ package application import ( "os" "path/filepath" + "runtime" "testing" ) @@ -25,6 +26,11 @@ func TestScaffoldCreatesExpectedFilesAndModes(t *testing.T) { t.Errorf("%s: %v", name, err) continue } + // Windows does not implement Unix permission bits. os.WriteFile applies + // the requested mode on Unix, but reports files as 0666 on Windows. + if runtime.GOOS == "windows" { + continue + } want := os.FileMode(0644) if name == "infra/install.sh" { want = 0755 diff --git a/internal/project/tree.go b/internal/project/tree.go index 959a3d4..348a384 100644 --- a/internal/project/tree.go +++ b/internal/project/tree.go @@ -37,7 +37,7 @@ func ValidateTree(dir string) error { } if entry.Type()&os.ModeSymlink != 0 { relative, _ := filepath.Rel(dir, path) - return fmt.Errorf("symlinks are not supported: %s", relative) + return fmt.Errorf("symlinks are not supported: %s", filepath.ToSlash(relative)) } return nil })