aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/oldwrapper.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/oldwrapper.go')
-rw-r--r--compiler_wrapper/oldwrapper.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler_wrapper/oldwrapper.go b/compiler_wrapper/oldwrapper.go
index 56559a31..f59d0cc2 100644
--- a/compiler_wrapper/oldwrapper.go
+++ b/compiler_wrapper/oldwrapper.go
@@ -329,16 +329,10 @@ sys.exit(main())
// Note: Using a self executable wrapper does not work due to a race condition
// on unix systems. See https://github.com/golang/go/issues/22315
- if err := env.run(&command{
+ oldWrapperCmd := &command{
path: "/usr/bin/python2",
args: append([]string{"-S", mockFile.Name()}, inputCmd.args...),
envUpdates: inputCmd.envUpdates,
- }, stdout, stderr); err != nil {
- if exitCode, ok := getExitCode(err); ok {
- return exitCode, nil
- }
- return 0, wrapErrorwithSourceLocf(err, "failed to call old wrapper. Command: %#v",
- inputCmd)
}
- return 0, nil
+ return wrapSubprocessErrorWithSourceLoc(oldWrapperCmd, env.run(oldWrapperCmd, stdout, stderr))
}