Skip to content

Build script doesn't show build errors #2920

@cristiand391

Description

@cristiand391

Describe the feature or problem you’d like to solve

The build script used by make doesn't output build errors:

make
go build -trimpath -ldflags "-X github.com/cli/cli/internal/build.Date=2021-02-05 -X github.com/cli/cli/internal/build.Version=v1.5.0-123-g962791bf " -o bin/gh ./cmd/gh
exit status 2
build.go: building task `bin/gh` failed.
Makefile:12: recipe for target 'bin/gh' failed
make: *** [bin/gh] Error 1

so in order to fix an error I have to re-run go build -trimpath... manually:

go build -trimpath -ldflags "-X github.com/cli/cli/internal/build.Date=2021-02-03 -X github.com/cli/cli/internal/build.Version=v1.5.0-123-g962791bf " -o bin/gh ./cmd/gh
# github.com/cli/cli/pkg/cmd/repo/list
pkg/cmd/repo/list/list.go:94:2: lala declared but not used

I would expect the build script to show build errors.

Proposed solution

Make the build script show build errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions