mirror of
https://github.com/containers/podman.git
synced 2025-12-03 03:39:44 +08:00
Vendor containers/storage for better error reporting on dups
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #971 Approved by: mheon
This commit is contained in:
committed by
Atomic Bot
parent
f228cf73e0
commit
da29c52c15
4
vendor/github.com/containers/storage/containers.go
generated
vendored
4
vendor/github.com/containers/storage/containers.go
generated
vendored
@@ -2,6 +2,7 @@ package storage
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -278,7 +279,8 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat
|
||||
names = dedupeNames(names)
|
||||
for _, name := range names {
|
||||
if _, nameInUse := r.byname[name]; nameInUse {
|
||||
return nil, ErrDuplicateName
|
||||
return nil, errors.Wrapf(ErrDuplicateName,
|
||||
fmt.Sprintf("the container name \"%s\" is already in use by \"%s\". You have to remove that container to be able to reuse that name.", name, r.byname[name].ID))
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
|
||||
1
vendor/github.com/containers/storage/containers_ffjson.go
generated
vendored
1
vendor/github.com/containers/storage/containers_ffjson.go
generated
vendored
@@ -1,5 +1,6 @@
|
||||
// Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
|
||||
// source: containers.go
|
||||
//
|
||||
|
||||
package storage
|
||||
|
||||
|
||||
2
vendor/github.com/containers/storage/pkg/directory/directory_unix.go
generated
vendored
2
vendor/github.com/containers/storage/pkg/directory/directory_unix.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// +build linux freebsd solaris
|
||||
// +build linux darwin freebsd solaris
|
||||
|
||||
package directory
|
||||
|
||||
|
||||
Reference in New Issue
Block a user