Skip to content

Commit 4727fc4

Browse files
committed
Ensure descriptive error when no github.com remotes found
1 parent 4ee995d commit 4727fc4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

context/context.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,17 @@ func (c *fsContext) Remotes() (Remotes, error) {
201201
if err != nil {
202202
return nil, err
203203
}
204-
205204
if len(gitRemotes) == 0 {
206-
return nil, errors.New("No git remotes found")
205+
return nil, errors.New("no git remotes found")
207206
}
207+
208208
sshTranslate := git.ParseSSHConfig().Translator()
209209
c.remotes = translateRemotes(gitRemotes, sshTranslate)
210210
}
211+
212+
if len(c.remotes) == 0 {
213+
return nil, errors.New("no git remote found for a github.com repository")
214+
}
211215
return c.remotes, nil
212216
}
213217

0 commit comments

Comments
 (0)