mirror of
https://github.com/spf13/viper
synced 2025-05-06 20:27:17 +00:00
fix viper config write permissions
This commit is contained in:
parent
8b9fb57d30
commit
f645e234c6
2 changed files with 1 additions and 2 deletions
1
go.mod
1
go.mod
|
@ -6,7 +6,6 @@ require (
|
|||
github.com/coreos/go-systemd v0.0.0-20190212144455-93d5ec2c7f76 // indirect
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.7
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/gogo/protobuf v1.2.1 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
|
||||
|
|
2
viper.go
2
viper.go
|
@ -1360,7 +1360,7 @@ func (v *Viper) writeConfig(filename string, force bool) error {
|
|||
return fmt.Errorf("File: %s exists. Use WriteConfig to overwrite.", filename)
|
||||
}
|
||||
}
|
||||
f, err := v.fs.OpenFile(filename, flags, os.FileMode(0644))
|
||||
f, err := v.fs.OpenFile(filename, flags, os.FileMode(0664))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue