MCPcopy Create free account
hub / github.com/dagger/dagger / runPath

Method runPath

cmd/dagger/shell.go:316–324  ·  view source on GitHub ↗

runPath executes code from a file

(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

314
315// runPath executes code from a file
316func (h *shellCallHandler) runPath(ctx context.Context, path string) error {
317 f, err := os.Open(path)
318 if err != nil {
319 return err
320 }
321 defer f.Close()
322 h.runner.Reset()
323 return h.run(ctx, f, path)
324}
325
326// runInteractive executes the runner on a REPL (Read-Eval-Print Loop)
327func (h *shellCallHandler) runInteractive(ctx context.Context) error {

Callers 1

RunAllMethod · 0.95

Calls 4

runMethod · 0.95
OpenMethod · 0.65
CloseMethod · 0.65
ResetMethod · 0.45

Tested by

no test coverage detected