1
0
mirror of https://github.com/rancher/os.git synced 2025-09-03 07:44:21 +00:00

Merge pull request #897 from datawolf/fix-set-rancher.debug-error

Remove `-D` when we set rancher.debug=false
This commit is contained in:
Darren Shepherd
2016-05-02 13:24:32 -07:00

View File

@@ -61,6 +61,13 @@ func LoadConfig() (*CloudConfig, error) {
if !util.Contains(cfg.Rancher.SystemDocker.Args, "-D") {
cfg.Rancher.SystemDocker.Args = append(cfg.Rancher.SystemDocker.Args, "-D")
}
} else {
if util.Contains(cfg.Rancher.Docker.Args, "-D") {
cfg.Rancher.Docker.Args = util.FilterStrings(cfg.Rancher.Docker.Args, func(x string) bool { return x != "-D" })
}
if util.Contains(cfg.Rancher.SystemDocker.Args, "-D") {
cfg.Rancher.SystemDocker.Args = util.FilterStrings(cfg.Rancher.SystemDocker.Args, func(x string) bool { return x != "-D" })
}
}
return cfg, nil