fixup! feat: add info command
diff --git a/pkg/aspect/info/BUILD.bazel b/pkg/aspect/info/BUILD.bazel index 81e0b64..16c13bd 100644 --- a/pkg/aspect/info/BUILD.bazel +++ b/pkg/aspect/info/BUILD.bazel
@@ -6,6 +6,7 @@ importpath = "aspect.build/cli/pkg/aspect/info", visibility = ["//visibility:public"], deps = [ + "//pkg/aspecterrors", "//pkg/bazel", "//pkg/ioutils", "@com_github_spf13_cobra//:cobra",
diff --git a/pkg/aspect/info/info.go b/pkg/aspect/info/info.go index 5132eb3..35fdf5c 100644 --- a/pkg/aspect/info/info.go +++ b/pkg/aspect/info/info.go
@@ -10,6 +10,8 @@ "aspect.build/cli/pkg/bazel" "aspect.build/cli/pkg/ioutils" "github.com/spf13/cobra" + + "aspect.build/cli/pkg/aspecterrors" ) type Info struct { @@ -32,7 +34,14 @@ } bazelCmd = append(bazelCmd, args...) bzl := bazel.New() - bzl.Spawn(bazelCmd) + + if exitCode, err := bzl.Spawn(bazelCmd); exitCode != 0 { + err = &aspecterrors.ExitError{ + Err: err, + ExitCode: exitCode, + } + return err + } return nil }