Skip to content

Commit 2dcb693

Browse files
committed
cmd/wit-bindgen-go/cmd/generate: do not write files with +x bit
1 parent ee27db4 commit 2dcb693

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/wit-bindgen-go/cmd/generate/generate.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ func writeGoPackages(_ context.Context, cmd *cli.Command, cfg *config, packages
192192
continue
193193
}
194194

195-
if err := os.WriteFile(path, content, cfg.outPerm); err != nil {
195+
// Do not copy the directory and exec bit
196+
if err := os.WriteFile(path, content, cfg.outPerm&0o666); err != nil {
196197
return err
197198
}
198199
}

0 commit comments

Comments
 (0)