Skip to content

Commit eb7bad8

Browse files
joeybloggsjoeybloggs
authored andcommitted
Ignore expected error
* Expected error no buildable Go source files in...
1 parent 1b21288 commit eb7bad8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

misc.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"log"
77
"os"
88
"os/exec"
9+
"strings"
910
)
1011

1112
func executeCmd(command string, args ...string) {
@@ -35,7 +36,12 @@ func executeCmd(command string, args ...string) {
3536
stdErrScanner := bufio.NewScanner(stdErr)
3637
go func() {
3738
for stdErrScanner.Scan() {
38-
fmt.Printf("%s\n", stdErrScanner.Text())
39+
40+
txt := stdErrScanner.Text()
41+
42+
if !strings.Contains(txt, "no buildable Go source files in") {
43+
fmt.Printf("%s\n", txt)
44+
}
3945
}
4046
}()
4147

0 commit comments

Comments
 (0)