code: func runHook(p *plugin.Plugin, event string) error {
  	hook := p.Metadata.Hooks.Get(event)
  	if hook == "" {
  		return nil
  	}
  
  	prog := exec.Command("sh", "-c", hook)
  	// TODO make this work on windows
  	// I think its ... ¯\_(ツ)_/¯
  	// prog := exec.Command("cmd", "/C", p.Metadata.Hooks.Install())
  
  	debug("running %s hook: %s", event, prog)
  
  	plugin.SetupPluginEnv(settings, p.Metadata.Name, p.Dir)
  	prog.Stdout, prog.Stderr = os.Stdout, os.Stderr
  	if err := prog.Run(); err != nil {
  		if eerr, ok := err.(*exec.ExitError); ok {
  			os.Stderr.Write(eerr.Stderr)
  			return fmt.Errorf("plugin %s hook for %q exited with error", event, p.Metadata.Name)
  		}
  		return err
  	}
  	return nil
  }
docs: // runHook will execute a plugin hook.