Skip to content

Commit

Permalink
Create files withot the executable bit by default
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Jul 12, 2022
1 parent 90f7f03 commit aa52ccf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion template.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ func (t *template) Render(schemes []*scheme) error {
return err
}

err = ioutil.WriteFile(fileName, []byte(rendered), 0777)
// We use 666 as the filemode here rather than 777 because we don't want
// it executable by default.
err = os.WriteFile(fileName, []byte(rendered), 0666)
if err != nil {
return err
}
Expand Down

0 comments on commit aa52ccf

Please sign in to comment.