Fix environment variables with the same prefix being skipped unintentionally (#98)
If you have two env variables (for example ONE_VARIABLE and ONE_VARIABLE_NAME) ONE_VARIABLE_NAME has prefix ONE_VARIABLE and will be skipped. Co-authored-by: Jakob <dev@schrej.net>
This commit is contained in:
@@ -129,7 +129,7 @@ eloop:
|
|||||||
for k := range s.Config().EnvVars {
|
for k := range s.Config().EnvVars {
|
||||||
// Don't allow any environment variables that we have already set above.
|
// Don't allow any environment variables that we have already set above.
|
||||||
for _, e := range out {
|
for _, e := range out {
|
||||||
if strings.HasPrefix(e, strings.ToUpper(k)) {
|
if strings.HasPrefix(e, strings.ToUpper(k) + "=") {
|
||||||
continue eloop
|
continue eloop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user