Skip to content

Commit

Permalink
Merge pull request #4 from render-oss/chmod-render-directory
Browse files Browse the repository at this point in the history
chmod render directory
  • Loading branch information
mdbenjam authored Nov 13, 2024
2 parents 807c121 + ec68f1a commit e2e9751
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ func Load() (*Config, error) {
return nil, err
}

err = os.Chmod(filepath.Dir(path), 0755)
if err != nil {
return nil, err
}

data, err := os.ReadFile(path)
if err != nil {
if os.IsNotExist(err) {
Expand Down Expand Up @@ -159,6 +164,11 @@ func (c *Config) Persist() error {
return err
}

err = os.Chmod(filepath.Dir(path), 0755)
if err != nil {
return err
}

err = os.MkdirAll(filepath.Dir(path), 0755)
if err != nil {
return err
Expand Down

0 comments on commit e2e9751

Please sign in to comment.