Run executes the command logic
(f factory.Factory, args []string)
| 36 | |
| 37 | // Run executes the command logic |
| 38 | func (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 | } |
no test coverage detected