mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 01:34:01 +00:00
improve message for already-exists error (#2968)
This commit is contained in:
parent
57efdfa38d
commit
646f58357e
|
@ -228,6 +228,9 @@ func (rc *ResourceCommand) Create(client auth.ClientI) error {
|
|||
// only return in case of error, to create multiple resources
|
||||
// in case if yaml spec is a list
|
||||
if err := creator(client, raw); err != nil {
|
||||
if trace.IsAlreadyExists(err) {
|
||||
return trace.Wrap(err, "use -f or --force flag to overwrite")
|
||||
}
|
||||
return trace.Wrap(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue