Skip to content

Commit e80c2f8

Browse files
authored
Merge pull request cli#656 from sh7dm/fix-repo-not-found
Don't list remotes when --repo flag is set
2 parents cb06812 + d755288 commit e80c2f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

command/root.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ func changelogURL(version string) string {
174174
}
175175

176176
func determineBaseRepo(cmd *cobra.Command, ctx context.Context) (ghrepo.Interface, error) {
177+
repo, err := cmd.Flags().GetString("repo")
178+
if err == nil && repo != "" {
179+
return ghrepo.FromFullName(repo), nil
180+
}
181+
177182
apiClient, err := apiClientForContext(ctx)
178183
if err != nil {
179184
return nil, err

0 commit comments

Comments
 (0)