diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f9ba1b7..b44cf5f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -7,7 +7,7 @@ permissions: contents: read jobs: - lint_build_test: + integrate: runs-on: ubuntu-latest steps: - name: Checkout code @@ -18,12 +18,12 @@ jobs: with: go-version-file: "go.mod" - - name: Lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.52.2 - - name: Build and test run: | go build -v ./... go test -v ./... + + - name: Lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.52.2 diff --git a/src/cmd/apt_query/main.go b/src/cmd/apt_query/main.go index 1bc4d13..ab9056c 100644 --- a/src/cmd/apt_query/main.go +++ b/src/cmd/apt_query/main.go @@ -44,7 +44,7 @@ func execCommand(name string, arg ...string) string { cmd := exec.Command(name, arg...) out, err := cmd.CombinedOutput() if err != nil { - fmt.Fprintln(os.Stderr, fmt.Sprintf("Error code %d encountered while running %s\n%s", cmd.ProcessState.ExitCode(), strings.Join(cmd.Args, " "), string(out))) + fmt.Fprintf(os.Stderr, "Error code %d encountered while running %s\n%s\n", cmd.ProcessState.ExitCode(), strings.Join(cmd.Args, " "), string(out)) os.Exit(2) } return string(out) @@ -97,10 +97,11 @@ func main() { pkgNames := os.Args[2:] switch command { + case "normalized-list": pkgs := getPackages(pkgNames) fmt.Println(pkgs.serialize()) - break + default: exitOnError("Command '%s' not recognized.", command) }