mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Environment vars with newlines should be indented
Break env var values with newlines so they form a consistent left alignment.
This commit is contained in:
parent
0d8f87a6a3
commit
dca79aaddd
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user