Skip to content

Commit 096633a

Browse files
committed
fix: respect group write permissions
1 parent 98edc6f commit 096633a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/wtp/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func initCommand(_ context.Context, cmd *cli.Command) error {
5454
return errors.DirectoryAccessFailed("access repository", repo.Path(), repoStatErr)
5555
}
5656

57-
if repoInfo.Mode().Perm()&0o200 == 0 {
57+
if repoInfo.Mode().Perm()&0o222 == 0 {
5858
return errors.DirectoryAccessFailed(
5959
"create configuration file",
6060
configPath,

internal/hooks/executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func ensureDirWritable(path string) error {
342342
return fmt.Errorf("not a directory: %s", path)
343343
}
344344

345-
if info.Mode().Perm()&0o200 == 0 {
345+
if info.Mode().Perm()&0o222 == 0 {
346346
return fmt.Errorf("write permission denied for directory: %s", path)
347347
}
348348

0 commit comments

Comments
 (0)