MCPcopy Create free account
hub / github.com/catppuccin/cli / Run

Method Run

internal/pkg/structs/program.go:80–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80func (h Hook) Run() error {
81 if len(h.Args) == 0 {
82 return errors.New("no args given for hook")
83 }
84 switch h.Type {
85 case HookTypeShell:
86 cmd := exec.Command(h.Args[0], h.Args[1:]...)
87 cmd.Stdout = os.Stdout
88 cmd.Stderr = os.Stderr
89 return cmd.Run()
90 case HookTypeBrowser:
91 return browser.OpenURL(h.Args[0])
92 default:
93 return fmt.Errorf("%q is an invalid hook type - .catppuccin.yaml invalid", h.Type)
94 }
95}
96
97type Catppuccinyaml struct {
98 Name string

Callers 1

RunHooksFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected