diff --git a/cmd/pulls/checkout.go b/cmd/pulls/checkout.go index 7dade3d..ba28bca 100644 --- a/cmd/pulls/checkout.go +++ b/cmd/pulls/checkout.go @@ -35,7 +35,10 @@ var CmdPullsCheckout = cli.Command{ func runPullsCheckout(cmd *cli.Context) error { ctx := context.InitCommand(cmd) - ctx.Ensure(context.CtxRequirement{LocalRepo: true}) + ctx.Ensure(context.CtxRequirement{ + LocalRepo: true, + RemoteRepo: true, + }) if ctx.Args().Len() != 1 { return fmt.Errorf("Must specify a PR index") } diff --git a/cmd/repos/fork.go b/cmd/repos/fork.go index 1811fce..53052bd 100644 --- a/cmd/repos/fork.go +++ b/cmd/repos/fork.go @@ -33,6 +33,7 @@ var CmdRepoFork = cli.Command{ func runRepoFork(cmd *cli.Context) error { ctx := context.InitCommand(cmd) + ctx.Ensure(context.CtxRequirement{RemoteRepo: true}) client := ctx.Login.Client() opts := gitea.CreateForkOption{}