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 @@ -369,7 +369,7 @@ func doLint(cmdline []string) {
369369
370370	linter  :=  downloadLinter (* cachedir )
371371	lflags  :=  []string {"run" , "--config" , ".golangci.yml" }
372- 	build .MustRunCommand (linter , append (lflags , packages ... )... )
372+ 	build .MustRunCommandWithOutput (linter , append (lflags , packages ... )... )
373373	fmt .Println ("You have achieved perfection." )
374374}
375375
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