-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ENV parsing on podman import
#3333
Fix ENV parsing on podman import
#3333
Conversation
Signed-off-by: Jordan Webb <jordemort@github.com>
Can one of the admins verify this patch?
|
Hi @jordemort. Thanks for your PR. I'm waiting for a containers or openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Hmm. That might break label parsing... |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jordemort, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Eh, this looks fine as-is. Changes LGTM. |
/lgtm |
/hold cancel |
The code that parses
--change
options topodman import
was not processing theENV
command in a useful way.pair
is created by splitting the option value on=
, but onlypair[1]
was being appended toenv
; this meant that there was no way to actually specify a value for an environment variable, sinceenv
is expected to be a list of strings of the formKEY=VALUE
.This PR fixes the issue by re-joining the elements of the
pair
array with=
from index 1 onward, and appending that toenv
instead of just appendingpair[1]
. This allows a command like the one below to function as expected:The resulting container will have
LANG
set toen_US.UTF-8
in its environment.No special consideration or treatment is made to the string other than re-joining the remainder on
=
. This allows environment variables with embedded=
characters to be specified without any additional gymnastics:The resulting container will have
EQUATION
set toFOO=BAR
in its environment.