Skip to content

Commit

Permalink
chore: update the permissions when making directory
Browse files Browse the repository at this point in the history
Signed-off-by: Florin-Mihai Anghel <[email protected]>
  • Loading branch information
anghelflorinm committed Oct 31, 2024
1 parent 6509bda commit efdcc4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/generate/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func readOsFileAndWriteToMemMap(t *testing.T, inputPath string, memPath string,
if err != nil {
t.Fatalf("error reading file %q: %v", inputPath, err)
}
if err := memFs.MkdirAll(filepath.Dir(memPath), 0770); err != nil {
if err := memFs.MkdirAll(filepath.Dir(memPath), 0660); err != nil {
t.Fatalf("error creating directory %q: %v", filepath.Dir(memPath), err)
}
f, err := memFs.Create(memPath)
Expand Down
2 changes: 1 addition & 1 deletion internal/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func GenerateFile(funcs template.FuncMap, contents string, data types.TmplDataIn
}
outputPath := data.BaseTmplDataInfo().OutputPath
fs := filesystem.FileSystem()
if err := fs.MkdirAll(filepath.Dir(outputPath), 0770); err != nil {
if err := fs.MkdirAll(filepath.Dir(outputPath), 0660); err != nil {
return err
}
f, err := fs.Create(path.Join(outputPath))
Expand Down

0 comments on commit efdcc4b

Please sign in to comment.