|
|
@ -178,7 +178,7 @@ func (o *repoAddOptions) run(out io.Writer) error {
|
|
|
|
|
|
|
|
|
|
|
|
// Check if the repo name is legal
|
|
|
|
// Check if the repo name is legal
|
|
|
|
if strings.Contains(o.name, "/") {
|
|
|
|
if strings.Contains(o.name, "/") {
|
|
|
|
return errors.Errorf("repository name (%s) contains '/', please specify a different name without '/'", o.name)
|
|
|
|
return fmt.Errorf("repository name (%s) contains '/', please specify a different name without '/'", o.name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// If the repo exists do one of two things:
|
|
|
|
// If the repo exists do one of two things:
|
|
|
@ -190,7 +190,7 @@ func (o *repoAddOptions) run(out io.Writer) error {
|
|
|
|
|
|
|
|
|
|
|
|
// The input coming in for the name is different from what is already
|
|
|
|
// The input coming in for the name is different from what is already
|
|
|
|
// configured. Return an error.
|
|
|
|
// configured. Return an error.
|
|
|
|
return errors.Errorf("repository name (%s) already exists, please specify a different name", o.name)
|
|
|
|
return fmt.Errorf("repository name (%s) already exists, please specify a different name", o.name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The add is idempotent so do nothing
|
|
|
|
// The add is idempotent so do nothing
|
|
|
|