Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
libotony committed Jul 26, 2024
1 parent 37514b6 commit bfc3eba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: Make
run: |
make
run: make all

- name: Make Test
id: unit-test
Expand Down
13 changes: 2 additions & 11 deletions internal/build/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,22 +163,13 @@ func ExpandPackagesNoVendor(patterns []string) []string {
}
if expand {
cmd := GoTool("list", patterns...)
var (
stdout bytes.Buffer
stderr bytes.Buffer
)
cmd.Stdout = &stdout
cmd.Stderr = &stderr
err := cmd.Run()
out, err := cmd.Output()
if err != nil {
log.Fatalf("package listing failed: %v\n", err)
}

fmt.Println(">>> go list STDOUT", string(stdout.Bytes()))
fmt.Println(">>> go list STDERR", string(stderr.Bytes()))

var packages []string
for _, line := range strings.Split(string(stdout.Bytes())+string(stderr.Bytes()), "\n") {
for _, line := range strings.Split(string(out), "\n") {
if !strings.Contains(line, "/vendor/") {
packages = append(packages, strings.TrimSpace(line))
}
Expand Down

0 comments on commit bfc3eba

Please sign in to comment.