MCPcopy Create free account
hub / github.com/ellotheth/pipethis / Run

Method Run

script.go:155–166  ·  view source on GitHub ↗

Run creates a new process, running Script.Name() with target and any additional arguments from the command line. It returns the result of the process.

(target string, args ...string)

Source from the content-addressed store, hash-verified

153// additional arguments from the command line. It returns the result of the
154// process.
155func (s Script) Run(target string, args ...string) error {
156 log.Println("Running", s.Name(), "with", target)
157
158 // the first argument is the script source location. replace it with the
159 // temporary filename.
160 args[0] = s.Name()
161
162 cmd := exec.Command(target, args...)
163 cmd.Stdout = os.Stdout
164 cmd.Stderr = os.Stderr
165 return cmd.Run()
166}
167
168// Echo prints the contents of the script to STDOUT
169func (s Script) Echo() error {

Callers 6

mainFunction · 0.95
TestSignatureTestFunction · 0.80
InspectMethod · 0.80
TestScriptTestFunction · 0.80
TestLocalPGPTestFunction · 0.80
TestLookupTestFunction · 0.80

Calls 1

NameMethod · 0.95

Tested by 4

TestSignatureTestFunction · 0.64
TestScriptTestFunction · 0.64
TestLocalPGPTestFunction · 0.64
TestLookupTestFunction · 0.64