MCPcopy Index your code
hub / github.com/rilldata/rill / execScript

Function execScript

cli/pkg/installscript/installscript.go:20–33  ·  view source on GitHub ↗
(ctx context.Context, version string, args ...string)

Source from the content-addressed store, hash-verified

18}
19
20func execScript(ctx context.Context, version string, args ...string) error {
21 script, err := createScriptFile(ctx, version)
22 if err != nil {
23 return err
24 }
25 defer os.Remove(script)
26
27 scriptArgs := append([]string{script}, args...)
28 cmd := exec.CommandContext(ctx, "/bin/sh", scriptArgs...)
29 cmd.Stdin = os.Stdin
30 cmd.Stdout = os.Stdout
31 cmd.Stderr = os.Stderr
32 return cmd.Run()
33}
34
35func createScriptFile(ctx context.Context, version string) (string, error) {
36 var url string

Callers 2

InstallFunction · 0.85
UninstallFunction · 0.85

Calls 3

createScriptFileFunction · 0.85
RemoveMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected