MCPcopy Index your code
hub / github.com/bitfield/script / ExampleIfExists_exec

Function ExampleIfExists_exec

script_unix_test.go:149–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147}
148
149func ExampleIfExists_exec() {
150 script.IfExists("./testdata/hello.txt").Exec("echo hello").Stdout()
151 // Output:
152 // hello
153}
154
155func ExampleIfExists_noExec() {
156 script.IfExists("doesntexist").Exec("echo hello").Stdout()

Callers

nothing calls this directly

Calls 3

IfExistsFunction · 0.92
StdoutMethod · 0.80
ExecMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…