Skip to content

Raise a clear error for malformed environment/labels list entries - #1601

Open
mokibit wants to merge 1 commit into
containers:mainfrom
mokibit:fix-malformed-environment-error
Open

mokibit wants to merge 1 commit into
containers:mainfrom
mokibit:fix-malformed-environment-error

Conversation

@mokibit

@mokibit mokibit commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

A non-string entry in the list form of environment or labels (e.g. - FOO: bar, which YAML parses as a dict) crashed with an unhelpful AttributeError. This commit validates list entries in norm_as_dict() and raises a more informative PodmanComposeError, matching docker compose behavior.

Fixes #627

A non-string entry in the list form of `environment` or `labels` (e.g.
`- FOO: bar`, which YAML parses as a dict) crashed with an unhelpful
`AttributeError`. This commit validates list entries in `norm_as_dict()`
and raises a more informative `PodmanComposeError`, matching docker
compose behavior.

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
@mokibit
mokibit force-pushed the fix-malformed-environment-error branch from ddb3e89 to 1b40048 Compare October 28, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing error message when malforming YAML

1 participant