filter out defined variables in error
This commit is contained in:
parent
924d9d4df7
commit
8c63f40f56
@ -104,6 +104,7 @@ func (c *Config) Parse() {
|
|||||||
}
|
}
|
||||||
for k, v := range c.env {
|
for k, v := range c.env {
|
||||||
if failed && (v.parsed.err == nil) {
|
if failed && (v.parsed.err == nil) {
|
||||||
|
if v.empty {
|
||||||
if v.unset {
|
if v.unset {
|
||||||
v.parsed.err = errors.New(fmt.Sprintf(`Environment variable "%s" not found. It should have been of type %s.`, k, v.dtype))
|
v.parsed.err = errors.New(fmt.Sprintf(`Environment variable "%s" not found. It should have been of type %s.`, k, v.dtype))
|
||||||
c.env[k] = v
|
c.env[k] = v
|
||||||
@ -113,6 +114,7 @@ func (c *Config) Parse() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status prints out failures that occured while parsing the environment to os.Stderr.
|
// Status prints out failures that occured while parsing the environment to os.Stderr.
|
||||||
|
Loading…
Reference in New Issue
Block a user