grim/convey
Clone
Summary
Browse
Changes
Graph
Return the os's environment variable if the version of we have doesn't have a value
redux
2021-10-10, Gary Kramlich
26b80367b6ed
Parents
dc10cf46e03b
Children
0ec51ea78397
Return the os's environment variable if the version of we have doesn't have a value
1 files changed, 5 insertions(+), 1 deletions(-)
+5
-1
environment/expand.go
--- a/environment/expand.go Thu Oct 07 04:22:26 2021 -0500
+++ b/environment/expand.go Sun Oct 10 22:06:26 2021 -0500
@@ -14,7 +14,11 @@
}
if val, found := e[name]; found {
- return val
+ if val != "" {
+ return val
+ }
+
+ return os.Getenv(name)
}
return ""