提交 93bbf4c3 编写于 作者: A Asare Worae

little bit of clean up

上级 e8a0487e
......@@ -231,12 +231,11 @@ func runStart(cmd *cobra.Command, args []string) {
if existing != nil && driver.IsKIC(existing.Driver) {
if viper.GetBool(createMount) {
mount := viper.GetString(mountString)
if len(existing.ContainerVolumeMounts) != 1 || existing.ContainerVolumeMounts[0] != mount {
old := ""
if len(existing.ContainerVolumeMounts) > 0 {
old = existing.ContainerVolumeMounts[0]
}
old := ""
if len(existing.ContainerVolumeMounts) > 0 {
old = existing.ContainerVolumeMounts[0]
}
if mount := viper.GetString(mountString); old != mount {
exit.Message(reason.GuestMountConflict, "Sorry, {{.driver}} does not allow mounts to be changed after container creation (previous mount: '{{.old}}', new mount: '{{.new}})'", out.V{
"driver": existing.Driver,
"new": mount,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册