Skip to content

Commit

Permalink
Merge pull request #446 from rawlingsj/runner_log
Browse files Browse the repository at this point in the history
add extra logging when runner fails to TestUsability
  • Loading branch information
rawlingsj authored May 13, 2023
2 parents 88adada + 74da350 commit 07548a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func New(opts ...Option) (*Context, error) {

// Check that we actually can run things in containers.
if !runner.TestUsability() {
return nil, fmt.Errorf("unable to run containers")
return nil, fmt.Errorf("unable to run containers using %s, specify --runner and one of %s", runner.Name(), GetAllRunners())
}

// Apply build options to the context.
Expand Down
2 changes: 1 addition & 1 deletion pkg/container/bubblewrap_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (bw *bubblewrap) Run(cfg *Config, args ...string) error {
func (bw *bubblewrap) TestUsability() bool {
_, err := exec.LookPath("bwrap")
if err != nil {
bw.logger.Debugf("cannot use bubblewrap for containers: bwrap not found on $PATH")
bw.logger.Warnf("cannot use bubblewrap for containers: bwrap not found on $PATH")
return false
}

Expand Down

0 comments on commit 07548a8

Please sign in to comment.