This commit is contained in:
1 parent
b705f00b22
commit
560605a8e1
10 files changed
+360
-13
No files matched your search
@@ -314,7 +314,7 @@ func writeProtectedConfigFile(name string, cfg *Config) error {
|
||||
}
|
||||
stored.SSLPrivateKeyPath = persistControlledSSLPath(stored.SSLPrivateKeyPath)
|
||||
stored.SSLPublicKeyPath = persistControlledSSLPath(stored.SSLPublicKeyPath)
|
||||
data, err := json.Marshal(stored)
|
||||
data, err := json.MarshalIndent(stored, "", " ")
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
}
|
||||
@@ -341,7 +341,7 @@ func readConfig() (*Config, error) {
|
||||
}
|
||||
cfgData, err := readConfigFile("config.json")
|
||||
if os.IsNotExist(err) {
|
||||
data, marshalErr := json.Marshal(configData)
|
||||
data, marshalErr := json.MarshalIndent(configData, "", " ")
|
||||
if marshalErr != nil {
|
||||
return nil, errors.Wrap(marshalErr)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user