diff options
Diffstat (limited to 'formatENV.go')
| -rw-r--r-- | formatENV.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/formatENV.go b/formatENV.go index 0d1efc3..3718b1f 100644 --- a/formatENV.go +++ b/formatENV.go @@ -16,6 +16,7 @@ func formatENV() (string, error) { var out string uniques := make(map[string]*Key) // check to make sure there are no duplicate entries + // todo: remove this duplicate entry check once duplicates aren't a problem anymore for c := range envPB.IterAll() { key := strings.ToLower(c.Var) if len(strings.Fields(key)) != 1 { @@ -35,6 +36,10 @@ func formatENV() (string, error) { log.Info("key has nil c", key) continue } + if c.Global != "" { + // don't write out anything defined globally + continue + } line := fmt.Sprintf("%s=%s", c.Var, c.Value) out += line + "\n" } |
