Skip to content

quoting issues for environment variables passed from podman #678

@dustymabe

Description

@dustymabe

I am seeing quoting issues for environment variables where newlines and quotes " are getting mangled somehow. See the output below.

[bound] -bash-5.3$ rpm -q podman crun crun-krun libkrun libkrunfw
podman-5.8.2-1.fc44.x86_64
crun-1.27.1-1.fc44.x86_64
crun-krun-1.27.1-1.fc44.x86_64
libkrun-1.17.4-1.fc44.x86_64
libkrunfw-5.3.0-1.fc44.x86_64
[bound] -bash-5.3$ podman pull --quiet quay.io/fedora/fedora:44
a01ae4eb9c82a895c1e10f58ff011a8dcfca2b68b88d44979871a73d40184f85
[bound] -bash-5.3$ 
[bound] -bash-5.3$ export JSON_VAR='
{
    "var": "value",
    "var2": "value2",
}'
[bound] -bash-5.3$ podman run -it --rm -e JSON_VAR quay.io/fedora/fedora:44 echo "$JSON_VAR"

{
    "var": "value",
    "var2": "value2",
}
[bound] -bash-5.3$ 
[bound] -bash-5.3$ podman run -it --rm --runtime=krun -e JSON_VAR quay.io/fedora/fedora:44 echo "$JSON_VAR"

n{
n    ""var"": ""value"",
n    ""var2"": ""value2"",
n}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions