code: func (Pipe) Run(ctx *context.Context) error {
  	var tmpl = tmpl.New(ctx)
  	/* #nosec */
  	for _, step := range ctx.Config.Before.Hooks {
  		s, err := tmpl.Apply(step)
  		if err != nil {
  			return err
  		}
  		args := strings.Fields(s)
  		log.Infof("running %s", color.CyanString(step))
  		cmd := exec.Command(args[0], args[1:]...)
  		cmd.Env = ctx.Env.Strings()
  		out, err := cmd.CombinedOutput()
  		log.Debug(string(out))
  		if err != nil {
  			return fmt.Errorf("hook failed: %s\n%v", step, string(out))
  		}
  	}
  	return nil
  }
docs: // Run executes the hooks