MCPcopy Index your code
hub / github.com/devspace-sh/devspace / Run

Method Run

cmd/add/plugin.go:38–53  ·  view source on GitHub ↗

Run executes the command logic

(f factory.Factory, args []string)

Source from the content-addressed store, hash-verified

36
37// Run executes the command logic
38func (cmd *pluginCmd) Run(f factory.Factory, args []string) error {
39 f.GetLog().Info("Installing plugin " + args[0])
40 addedPlugin, err := f.NewPluginManager(f.GetLog()).Add(args[0], cmd.Version)
41 if err != nil {
42 return err
43 }
44 f.GetLog().Donef("Successfully installed plugin %s", args[0])
45
46 // Execute plugin hook
47 err = plugin.ExecutePluginHookAt(*addedPlugin, "after:installPlugin", "after_install")
48 if err != nil {
49 return err
50 }
51
52 return nil
53}

Callers 1

newPluginCmdFunction · 0.95

Calls 6

ExecutePluginHookAtFunction · 0.92
GetLogMethod · 0.65
AddMethod · 0.65
NewPluginManagerMethod · 0.65
InfoMethod · 0.45
DonefMethod · 0.45

Tested by

no test coverage detected