mirror of
https://github.com/containers/podman.git
synced 2025-06-17 06:57:43 +08:00
Strip key/values of external quotes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -611,7 +611,7 @@ func (f *UnitFile) Lookup(groupName string, key string) (string, bool) {
|
||||
return "", false
|
||||
}
|
||||
|
||||
return strings.TrimRightFunc(v, unicode.IsSpace), true
|
||||
return strings.Trim(strings.TrimRightFunc(v, unicode.IsSpace), "\""), true
|
||||
}
|
||||
|
||||
// Lookup the last instance of a key and convert the value to a bool
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Container]
|
||||
Image=localhost/imagename
|
||||
## assert-podman-args "--health-cmd" "\"hello world\""
|
||||
## assert-podman-args "--health-cmd" "hello world"
|
||||
HealthCmd="hello world"
|
||||
## assert-podman-args "--health-interval" "1m"
|
||||
HealthInterval=1m
|
||||
|
@ -1,4 +1,4 @@
|
||||
[Container]
|
||||
Image=localhost/imagename
|
||||
## assert-podman-args "--hostname" "\"quadlet-host\""
|
||||
HostName="quadlet-host"
|
||||
## assert-podman-args "--hostname" "quadlet-host"
|
||||
HostName=quadlet-host
|
||||
|
6
test/e2e/quadlet/quotes.container
Normal file
6
test/e2e/quadlet/quotes.container
Normal file
@ -0,0 +1,6 @@
|
||||
## assert-podman-final-args localhost/imagename
|
||||
## assert-podman-args --name=RemoveQuotes\"Name
|
||||
|
||||
[Container]
|
||||
Image="localhost/imagename"
|
||||
ContainerName="RemoveQuotes"Name"
|
@ -794,6 +794,7 @@ BOGUS=foo
|
||||
Entry("ports.container", "ports.container", 0, ""),
|
||||
Entry("ports_ipv6.container", "ports_ipv6.container", 0, ""),
|
||||
Entry("pull.container", "pull.container", 0, ""),
|
||||
Entry("quotes.container", "quotes.container", 0, ""),
|
||||
Entry("readonly.container", "readonly.container", 0, ""),
|
||||
Entry("readonly-tmpfs.container", "readonly-tmpfs.container", 0, ""),
|
||||
Entry("readonly-notmpfs.container", "readonly-notmpfs.container", 0, ""),
|
||||
|
Reference in New Issue
Block a user