mirror of https://github.com/docker/cli.git
stack: Change unexpected environment variable error
Make the error more specific by stating that it's caused by a specific environment variable and not an environment as a whole. Also don't escape the variable to make it more readable. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
a47058bbd5
commit
012b77952e
|
@ -120,7 +120,7 @@ func buildEnvironment(env []string) (map[string]string, error) {
|
|||
|
||||
k, v, ok := strings.Cut(s, "=")
|
||||
if !ok || k == "" {
|
||||
return result, errors.Errorf("unexpected environment %q", s)
|
||||
return result, errors.Errorf("unexpected environment variable '%s'", s)
|
||||
}
|
||||
// value may be set, but empty if "s" is like "K=", not "K".
|
||||
result[k] = v
|
||||
|
|
Loading…
Reference in New Issue