mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
make fn run check for env var literal value (#495)
This commit is contained in:
committed by
Travis Reeder
parent
a80fe9c897
commit
67af2757cd
@@ -91,7 +91,13 @@ func extractEnvVar(e string) ([]string, string) {
|
||||
kv := strings.Split(e, "=")
|
||||
name := toEnvName("HEADER", kv[0])
|
||||
sh := []string{"-e", name}
|
||||
env := fmt.Sprintf("%s=%s", name, os.Getenv(kv[0]))
|
||||
var v string
|
||||
if len(kv) > 1 {
|
||||
v = kv[1]
|
||||
} else {
|
||||
v = os.Getenv(kv[0])
|
||||
}
|
||||
env := fmt.Sprintf("%s=%s", name, v)
|
||||
return sh, env
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user