Commit 1fd78e1f authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

cmd/go: provide full path as os.Args[0] when invoking tools

cmd/dist needs to re-exec or open itself to detect GOARM (CL 3973) and
detect host machine endianness (CL 14460).

Change-Id: If6438831ab0715ba8e236d64bb2c7c1bde1470aa
Reviewed-on: https://go-review.googlesource.com/14476Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent eddd7ff3
......@@ -98,6 +98,7 @@ func runTool(cmd *Command, args []string) {
fmt.Printf("%s\n", cmd)
return
}
args[0] = toolPath // in case the tool wants to re-exec itself, e.g. cmd/dist
toolCmd := &exec.Cmd{
Path: toolPath,
Args: args,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment