Fix context requirements of subcommands #474

Merged
lunny merged 3 commits from noerw/tea:fix-fork-ctxreq into master 2022-03-26 07:32:53 +00:00
Showing only changes of commit 0ec2dc0ac2 - Show all commits

View File

@ -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")
}