MCPcopy
hub / github.com/cli/cli / executeParentHooks

Function executeParentHooks

pkg/cmdutil/repo_override.go:12–20  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

10)
11
12func executeParentHooks(cmd *cobra.Command, args []string) error {
13 for cmd.HasParent() {
14 cmd = cmd.Parent()
15 if cmd.PersistentPreRunE != nil {
16 return cmd.PersistentPreRunE(cmd, args)
17 }
18 }
19 return nil
20}
21
22func EnableRepoOverride(cmd *cobra.Command, f *Factory) {
23 cmd.PersistentFlags().StringP("repo", "R", "", "Select another repository using the `[HOST/]OWNER/REPO` format")

Callers 1

EnableRepoOverrideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected