Skip to content

Commit

Permalink
cmd/root2arrow: improve automatic installation of arrow-cat
Browse files Browse the repository at this point in the history
This CL adds detection of the need to actually install arrow-cat.
This removes the churn on go.mod wrt apache/arrow.
  • Loading branch information
sbinet committed Jan 29, 2020
1 parent 237736a commit c1fb32e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/root2arrow/main_test.go
Expand Up @@ -15,7 +15,12 @@ import (
)

func init() {
o, err := exec.Command("go", "get", "github.com/apache/arrow/go/arrow/ipc/cmd/arrow-cat").CombinedOutput()
_, err := exec.LookPath("arrow-cat")
if err == nil {
return
}

o, err := exec.Command("go", "install", "github.com/apache/arrow/go/arrow/ipc/cmd/arrow-cat").CombinedOutput()
if err != nil {
panic(xerrors.Errorf("could not install arrow-cat command:\n%v\nerr: %w", string(o), err))
}
Expand Down

0 comments on commit c1fb32e

Please sign in to comment.