We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d4dfb16 + 82477c7 commit 5e7edb9Copy full SHA for 5e7edb9
internal/goutil/goutil.go
@@ -1,6 +1,7 @@
1
package goutil
2
3
import (
4
+ "bytes"
5
"fmt"
6
"go/build"
7
"os"
@@ -190,8 +191,14 @@ func Install(importPath string) error {
190
191
if importPath == "command-line-arguments" {
192
return errors.New("is devel-binary copied from local environment")
193
}
- if err := exec.Command(goExe, "install", importPath+"@latest").Run(); err != nil {
194
- return fmt.Errorf("can't install %s: %w", importPath, err)
+
195
+ var stderr bytes.Buffer
196
+ cmd := exec.Command(goExe, "install", importPath+"@latest")
197
+ cmd.Stderr = &stderr
198
199
+ err := cmd.Run()
200
+ if err != nil {
201
+ return fmt.Errorf("can't install %s:\n%s", importPath, stderr.String())
202
203
return nil
204
0 commit comments