From efdcc4bcc798dd7568038f96726a24e219982356 Mon Sep 17 00:00:00 2001 From: Florin-Mihai Anghel Date: Thu, 31 Oct 2024 16:08:36 +0100 Subject: [PATCH] chore: update the permissions when making directory Signed-off-by: Florin-Mihai Anghel --- cmd/generate/generate_test.go | 2 +- internal/generate/generate.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/generate/generate_test.go b/cmd/generate/generate_test.go index 8a7e76e..6aec68b 100644 --- a/cmd/generate/generate_test.go +++ b/cmd/generate/generate_test.go @@ -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) diff --git a/internal/generate/generate.go b/internal/generate/generate.go index c3eacc2..e92d2c5 100644 --- a/internal/generate/generate.go +++ b/internal/generate/generate.go @@ -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))