Ensure descriptive error when no github.com remotes found
This commit is contained in:
parent
4ee995dafd
commit
4727fc4659
1 changed files with 6 additions and 2 deletions
|
|
@ -201,13 +201,17 @@ func (c *fsContext) Remotes() (Remotes, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(gitRemotes) == 0 {
|
||||
return nil, errors.New("No git remotes found")
|
||||
return nil, errors.New("no git remotes found")
|
||||
}
|
||||
|
||||
sshTranslate := git.ParseSSHConfig().Translator()
|
||||
c.remotes = translateRemotes(gitRemotes, sshTranslate)
|
||||
}
|
||||
|
||||
if len(c.remotes) == 0 {
|
||||
return nil, errors.New("no git remote found for a github.com repository")
|
||||
}
|
||||
return c.remotes, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue