| 104 | } |
| 105 | |
| 106 | func printCreateFiles(cfg *Config, w io.Writer, markdown bool) error { |
| 107 | if len(cfg.CreateFiles) == 0 { |
| 108 | return nil |
| 109 | } |
| 110 | |
| 111 | shims := "" |
| 112 | for name, src := range cfg.CreateFiles { |
| 113 | if src != "" { |
| 114 | shims += fmt.Sprintf("* %s\n", name) |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | _, err := fmt.Fprintf( |
| 119 | w, |
| 120 | "%sThis plugin creates the following helper files:\n%s\n", |
| 121 | lo.Ternary(markdown, "### ", ""), |
| 122 | shims, |
| 123 | ) |
| 124 | return errors.WithStack(err) |
| 125 | } |
| 126 | |
| 127 | func printEnv(cfg *Config, w io.Writer, markdown bool) error { |
| 128 | if len(cfg.Env) == 0 { |