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) {
366366
367367 linter := downloadLinter (* cachedir )
368368 lflags := []string {"run" , "--config" , ".golangci.yml" }
369- build .MustRunCommand (linter , append (lflags , packages ... )... )
369+ build .MustRunCommandWithOutput (linter , append (lflags , packages ... )... )
370370 fmt .Println ("You have achieved perfection." )
371371}
372372
Original file line number Diff line number Diff line change @@ -68,6 +68,25 @@ func MustRunCommand(cmd string, args ...string) {
6868 MustRun (exec .Command (cmd , args ... ))
6969}
7070
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+
7190var warnedAboutGit bool
7291
7392// RunGit runs a git subcommand and returns its output.
You can’t perform that action at this time.
0 commit comments