Skip to content

Commit

Permalink
feat: include docker daemon mention in error (#203)
Browse files Browse the repository at this point in the history
This PR mentions inside the error message that the Kurtosis engine might
fail to start if the docker daemon is not running.
  • Loading branch information
MegaRedHand authored Feb 3, 2025
1 parent 5de9507 commit 2f7631b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/kurtosis/kurtosis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package kurtosis

import (
"context"
"fmt"
"os/exec"

"github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves"
Expand All @@ -22,7 +23,8 @@ func InitKurtosisContext() (KurtosisCtx, error) {
// Kurtosis engine is probably not running. Try to start it.
// TODO: avoid using the CLI for this
if exec.Command("kurtosis", "engine", "start").Run() != nil {
return KurtosisCtx{}, err
return KurtosisCtx{}, fmt.Errorf("failed to start Kurtosis engine: %w\n"+
"This might be because the docker daemon is not running", err)
}
ctx, err = kurtosis_context.NewKurtosisContextFromLocalEngine()
}
Expand Down

0 comments on commit 2f7631b

Please sign in to comment.