Skip to content

Commit

Permalink
fixup! feat: add info command
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Sep 18, 2021
1 parent 8497b7c commit c79b822
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/aspect/info/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ go_library(
importpath = "aspect.build/cli/pkg/aspect/info",
visibility = ["//visibility:public"],
deps = [
"//pkg/aspecterrors",
"//pkg/bazel",
"//pkg/ioutils",
"@com_github_spf13_cobra//:cobra",
Expand Down
11 changes: 10 additions & 1 deletion pkg/aspect/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"aspect.build/cli/pkg/bazel"
"aspect.build/cli/pkg/ioutils"
"github.com/spf13/cobra"

"aspect.build/cli/pkg/aspecterrors"
)

type Info struct {
Expand All @@ -32,7 +34,14 @@ func (v *Info) Run(_ *cobra.Command, args []string) error {
}
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
}

0 comments on commit c79b822

Please sign in to comment.