Browse Source

env: use foo= instead of foo="" for empty variables

to improve readability

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/45/head
Alejandro Mery 9 months ago
parent
commit
e410797413
  1. 4
      pkg/cluster/env.go

4
pkg/cluster/env.go

@ -117,8 +117,12 @@ func (m *Env) writeEnvVar(w io.Writer, value string, name string, args ...any) {
if name != "" {
value = strings.TrimSpace(value)
if value == "" {
_, _ = fmt.Fprintf(w, "%s%s=\n", prefix, name)
} else {
_, _ = fmt.Fprintf(w, "%s%s=%q\n", prefix, name, value)
}
}
}
func genEnvZoneNodes(z *Zone) string {

Loading…
Cancel
Save