Skip to content

Commit

Permalink
v.io/x/devtools: fix bug v.io/i/1300.
Browse files Browse the repository at this point in the history
Change-Id: Id229c43c8de4e82c3dbc97fd5eb895c6f285ab8d
  • Loading branch information
Cosmos Nicolaou committed Apr 19, 2016
1 parent 0bf95d9 commit 3c765b8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions jiri-go/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ func runGo(jirix *jiri.X, args []string) error {
if readerFlags.Target.OS() == "fnl" {
installSuffix = "musl"
}
if args, err = golib.PrepareGo(jirix, envMap, args, extraLDFlags, installSuffix); err != nil {
newArgs, err := golib.PrepareGo(jirix, envMap, args, extraLDFlags, installSuffix)
if err != nil {
return err
}
// Don't run go env if PrepareGo stripped off the environment
// variables that the go tool doesn't understand - e.g. VDLPATH.
if len(args) == 1 && args[0] == "env" {
// variables that the go tool doesn't understand - e.g. VDLPATH,
// unless the original command was just 'go env'.
if len(newArgs) == 1 && newArgs[0] == "env" && !(len(args) == 1 && args[0] == "env") {
return nil
}
// Run the go tool.
Expand All @@ -105,9 +107,9 @@ func runGo(jirix *jiri.X, args []string) error {
return err
}
if envFlag {
fmt.Fprintf(jirix.Stdout(), "\n%v %s\n", goBin, strings.Join(args, " "))
fmt.Fprintf(jirix.Stdout(), "\n%v %s\n", goBin, strings.Join(newArgs, " "))
}
err = jirix.NewSeq().Env(envMap).Capture(jirix.Stdout(), jirix.Stderr()).Last(goBin, args...)
err = jirix.NewSeq().Env(envMap).Capture(jirix.Stdout(), jirix.Stderr()).Last(goBin, newArgs...)
return runutil.TranslateExitCode(err)
}

Expand Down

0 comments on commit 3c765b8

Please sign in to comment.