diff options
Diffstat (limited to 'compiler_wrapper/bisect_flag.go')
-rw-r--r-- | compiler_wrapper/bisect_flag.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler_wrapper/bisect_flag.go b/compiler_wrapper/bisect_flag.go index 8aec3e7e..adfa8b03 100644 --- a/compiler_wrapper/bisect_flag.go +++ b/compiler_wrapper/bisect_flag.go @@ -7,6 +7,7 @@ package main import ( "errors" "os" + "os/exec" "path/filepath" ) @@ -20,7 +21,7 @@ import sys def ExpandArgs(args, target): for arg in args: if arg[0] == '@': - with open(arg[1:], 'rb') as f: + with open(arg[1:], 'r', encoding='utf-8') as f: ExpandArgs(shlex.split(f.read()), target) else: target.append(arg) @@ -52,7 +53,7 @@ func calcBisectCommand(env env, cfg *config, bisectStage string, compilerCmd *co } } absCompilerPath := getAbsCmdPath(env, compilerCmd) - pythonPath, err := filepath.Abs(os.Args[0]) + pythonPath, err := exec.LookPath(os.Args[0]) if err != nil { return nil, err } @@ -64,7 +65,7 @@ func calcBisectCommand(env env, cfg *config, bisectStage string, compilerCmd *co return &command{ Path: "/usr/bin/env", Args: append([]string{ - "python", + "python3", "-c", bisectPythonCommand, bisectStage, |