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 829d33f
Showing 1 changed file with 10 additions and 1 deletion.
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 829d33f

Please sign in to comment.