(d devboxer, body string)
| 137 | } |
| 138 | |
| 139 | func ScriptBody(d devboxer, body string) (string, error) { |
| 140 | var buf bytes.Buffer |
| 141 | err := scriptWrapperTmpl.Execute(&buf, map[string]string{ |
| 142 | "Body": body, |
| 143 | "SkipInitHookHash": d.SkipInitHookEnvName(), |
| 144 | "InitHookPath": ScriptPath(d.ProjectDir(), HooksFilename), |
| 145 | }) |
| 146 | if err != nil { |
| 147 | return "", errors.WithStack(err) |
| 148 | } |
| 149 | return buf.String(), nil |
| 150 | } |
no test coverage detected