Merge pull request #5531 from samuelkarp/freebsd-ctr-run-mounts

ctr: parse mount options with embedded = character
This commit is contained in:
Derek McGowan 2021-05-25 13:38:54 -07:00 committed by GitHub
commit 96df20cf77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,8 +63,8 @@ func parseMountFlag(m string) (specs.Mount, error) {
} }
for _, field := range fields { for _, field := range fields {
v := strings.Split(field, "=") v := strings.SplitN(field, "=", 2)
if len(v) != 2 { if len(v) < 2 {
return mount, fmt.Errorf("invalid mount specification: expected key=val") return mount, fmt.Errorf("invalid mount specification: expected key=val")
} }