Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/application/scaffold_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package application
import (
"os"
"path/filepath"
"runtime"
"testing"
)

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/project/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
Loading