mirror of
https://github.com/containers/podman.git
synced 2026-07-19 19:51:51 -04:00
volumes: do not pass mount opt as formatter string
otherwise passing a formatter string as an option causes a weird error message: $ podman run --mount type=devpts,destination=/dev/pts,%sfoo ... Error: %!s(MISSING)foo: invalid mount option Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@@ -360,7 +360,7 @@ func getBindMount(args []string) (spec.Mount, error) {
|
||||
// Since Docker ignores this option so shall we.
|
||||
continue
|
||||
default:
|
||||
return newMount, errors.Wrapf(util.ErrBadMntOption, kv[0])
|
||||
return newMount, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ func getTmpfsMount(args []string) (spec.Mount, error) {
|
||||
// Since Docker ignores this option so shall we.
|
||||
continue
|
||||
default:
|
||||
return newMount, errors.Wrapf(util.ErrBadMntOption, kv[0])
|
||||
return newMount, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ func getDevptsMount(args []string) (spec.Mount, error) {
|
||||
newMount.Destination = filepath.Clean(kv[1])
|
||||
setDest = true
|
||||
default:
|
||||
return newMount, errors.Wrapf(util.ErrBadMntOption, kv[0])
|
||||
return newMount, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ func getNamedVolume(args []string) (*specgen.NamedVolume, error) {
|
||||
// Since Docker ignores this option so shall we.
|
||||
continue
|
||||
default:
|
||||
return nil, errors.Wrapf(util.ErrBadMntOption, kv[0])
|
||||
return nil, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ func getImageVolume(args []string) (*specgen.ImageVolume, error) {
|
||||
// Since Docker ignores this option so shall we.
|
||||
continue
|
||||
default:
|
||||
return nil, errors.Wrapf(util.ErrBadMntOption, kv[0])
|
||||
return nil, errors.Wrapf(util.ErrBadMntOption, "%s", kv[0])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user