Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/gocommand: fix environment on Windows
Seems like os.Environ() is necessary after all. My bad for not testing my earlier change on Windows. I'm not able to reproduce the behavior in my test, so it's not really testing the crash correctly. Fixes golang/go#38062 Change-Id: Ied45bbf572023a9dcd5d020db49bf3e95c824602 Reviewed-on: https://go-review.googlesource.com/c/tools/+/226370 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
- Loading branch information
1 parent
31583a0
commit f8bfb4e
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2020 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package gocommand_test | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"golang.org/x/tools/internal/gocommand" | ||
) | ||
|
||
func TestGoVersion(t *testing.T) { | ||
inv := gocommand.Invocation{ | ||
Verb: "version", | ||
} | ||
if _, err := inv.Run(context.Background()); err != nil { | ||
t.Error(err) | ||
} | ||
} |