MCPcopy Index your code
hub / github.com/jetify-com/devbox / ScriptBody

Function ScriptBody

internal/shellgen/scripts.go:139–150  ·  view source on GitHub ↗
(d devboxer, body string)

Source from the content-addressed store, hash-verified

137}
138
139func 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}

Callers 2

RunScriptMethod · 0.92
WriteScriptsToFilesFunction · 0.85

Calls 5

ScriptPathFunction · 0.85
ExecuteMethod · 0.65
SkipInitHookEnvNameMethod · 0.65
ProjectDirMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected