File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ func doLint(cmdline []string) {
366
366
367
367
linter := downloadLinter (* cachedir )
368
368
lflags := []string {"run" , "--config" , ".golangci.yml" }
369
- build .MustRunCommand (linter , append (lflags , packages ... )... )
369
+ build .MustRunCommandWithOutput (linter , append (lflags , packages ... )... )
370
370
fmt .Println ("You have achieved perfection." )
371
371
}
372
372
Original file line number Diff line number Diff line change @@ -68,6 +68,25 @@ func MustRunCommand(cmd string, args ...string) {
68
68
MustRun (exec .Command (cmd , args ... ))
69
69
}
70
70
71
+ func MustRunCommandWithOutput (cmd string , args ... string ) {
72
+ var done chan bool
73
+ // This is a little loop to generate some output, so CI does not tear down the
74
+ // process after 300 seconds.
75
+ go func () {
76
+ for i := 0 ; i < 15 ; i ++ {
77
+ fmt .Printf ("Waiting for command %q\n " , cmd )
78
+ select {
79
+ case <- time .After (time .Minute ):
80
+ break
81
+ case <- done :
82
+ return
83
+ }
84
+ }
85
+ }()
86
+ MustRun (exec .Command (cmd , args ... ))
87
+ close (done )
88
+ }
89
+
71
90
var warnedAboutGit bool
72
91
73
92
// RunGit runs a git subcommand and returns its output.
You can’t perform that action at this time.
0 commit comments