Environment vars with newlines should be indented

Break env var values with newlines so they form a consistent left alignment.
parent 0d8f87a6
......@@ -1562,7 +1562,13 @@ func describeContainerEnvVars(container api.Container, resolverFn EnvVarResolver
for _, e := range container.Env {
if e.ValueFrom == nil {
w.Write(LEVEL_3, "%s:\t%s\n", e.Name, e.Value)
for i, s := range strings.Split(e.Value, "\n") {
if i == 0 {
w.Write(LEVEL_3, "%s:\t%s\n", e.Name, s)
} else {
w.Write(LEVEL_3, "\t%s\n", s)
}
}
continue
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment