Merge pull request #656 from sh7dm/fix-repo-not-found

Don't list remotes when --repo flag is set
This commit is contained in:
Mislav Marohnić 2020-03-18 13:53:57 +01:00 committed by GitHub
commit e80c2f852d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,6 +174,11 @@ func changelogURL(version string) string {
}
func determineBaseRepo(cmd *cobra.Command, ctx context.Context) (ghrepo.Interface, error) {
repo, err := cmd.Flags().GetString("repo")
if err == nil && repo != "" {
return ghrepo.FromFullName(repo), nil
}
apiClient, err := apiClientForContext(ctx)
if err != nil {
return nil, err