diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6aa257e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +on: [push, pull_request] +name: Test +env: + GOPROXY: "https://proxy.golang.org" +jobs: + test: + strategy: + matrix: + go-version: [1.14.x, 1.15.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Format + run: gofmt -d . + - name: Lint + if: matrix.os != 'windows-latest' + run: | + go get -v -u golang.org/x/lint/golint + $(go env GOPATH)/bin/golint -set_exit_status . + - name: Vet + run: go vet + - name: Test + run: go test -v -race ./... diff --git a/cmd/exec.go b/cmd/exec.go index be8119c..d5fa9a9 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -102,7 +102,7 @@ var execCmd = &cobra.Command{ executable := args[0] pathtoExec, err := exec.LookPath(executable) if err != nil { - log.Fatalf("couldn't find the executable '%s': %w", pathtoExec, err) + log.Fatalf("couldn't find the executable '%s': %s", pathtoExec, err.Error()) } log.Debugf("found executable %s", pathtoExec)