aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/stub.go
diff options
context:
space:
mode:
Diffstat (limited to 'helper/stub.go')
-rw-r--r--helper/stub.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/helper/stub.go b/helper/stub.go
index 32dc11e9..6a591733 100644
--- a/helper/stub.go
+++ b/helper/stub.go
@@ -85,6 +85,11 @@ func InternalReplaceExecCommand(t *testing.T) {
// replace execCommand to have the resulting *exec.Cmd launch TestHelperChildStub
execCommand = func(name string, arg ...string) *exec.Cmd {
+ // pass through nonexistent path
+ if name == "/nonexistent" && len(arg) == 0 {
+ return exec.Command(name)
+ }
+
return exec.Command(os.Args[0], append([]string{"-test.run=TestHelperChildStub", "--", name}, arg...)...)
}
}