MCPcopy
hub / github.com/asdf-vm/asdf / CallbackPath

Method CallbackPath

internal/plugins/plugins.go:196–204  ·  view source on GitHub ↗

CallbackPath returns the full file path to a callback script

(name string)

Source from the content-addressed store, hash-verified

194
195// CallbackPath returns the full file path to a callback script
196func (p Plugin) CallbackPath(name string) (string, error) {
197 path := filepath.Join(p.Dir, "bin", name)
198 _, err := os.Stat(path)
199 if errors.Is(err, os.ErrNotExist) {
200 return "", NoCallbackError{callback: name, plugin: p.Name}
201 }
202
203 return path, nil
204}
205
206// ShimTemplatePath returns the full file path to a shim, if it exists
207func (p Plugin) ShimTemplatePath(shimName string) (string, error) {

Callers 3

RunCallbackMethod · 0.95
GenerateFunction · 0.80
TestCallbackPathFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestCallbackPathFunction · 0.64