mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/ctrld: ensure viper is re-new in --cd mode
This commit is contained in:
committed by
Cuong Manh Le
parent
279e938b2a
commit
3a5c71514c
@@ -449,6 +449,7 @@ func processCDFlags() {
|
||||
},
|
||||
}
|
||||
|
||||
v = viper.NewWithOptions(viper.KeyDelimiter("::"))
|
||||
v.Set("network", cfg.Network)
|
||||
v.Set("upstream", cfg.Upstream)
|
||||
v.Set("listener", cfg.Listener)
|
||||
|
||||
@@ -60,7 +60,7 @@ func initLogging() {
|
||||
fmt.Fprintf(os.Stderr, "failed to create log path: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
logFile, err := os.OpenFile(logFilePath, os.O_APPEND|os.O_CREATE|os.O_RDWR, 0600)
|
||||
logFile, err := os.OpenFile(logFilePath, os.O_APPEND|os.O_CREATE|os.O_RDWR, os.FileMode(0o600))
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "failed to create log file: %v", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user