MCPcopy Create free account
hub / github.com/astercloud/aster / NewBashRuntime

Function NewBashRuntime

pkg/tools/bridge/runtime.go:472–486  ·  view source on GitHub ↗

NewBashRuntime 创建 Bash 运行时

(config *RuntimeConfig)

Source from the content-addressed store, hash-verified

470
471// NewBashRuntime 创建 Bash 运行时
472func NewBashRuntime(config *RuntimeConfig) *BashRuntime {
473 if config == nil {
474 config = DefaultRuntimeConfig()
475 }
476
477 bashPath := "/bin/bash"
478 if path, err := exec.LookPath("bash"); err == nil {
479 bashPath = path
480 }
481
482 return &BashRuntime{
483 config: config,
484 bashPath: bashPath,
485 }
486}
487
488func (r *BashRuntime) Language() Language {
489 return LangBash

Callers 2

TestBashRuntime_ExecuteFunction · 0.85
NewRuntimeManagerFunction · 0.85

Calls 1

DefaultRuntimeConfigFunction · 0.85

Tested by 1

TestBashRuntime_ExecuteFunction · 0.68