From 2d4b6ef2eef48c06567a38ab89ceb18025209ce8 Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Thu, 10 Mar 2022 14:53:37 -0700 Subject: [PATCH] Print error for 0.1.0 plans being loaded Signed-off-by: Joel Longtine --- cmd/dagger/cmd/do.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/dagger/cmd/do.go b/cmd/dagger/cmd/do.go index 7d74acc9..06cf8f9f 100644 --- a/cmd/dagger/cmd/do.go +++ b/cmd/dagger/cmd/do.go @@ -58,7 +58,13 @@ var doCmd = &cobra.Command{ p, err := loadPlan() if err != nil { - lg.Fatal().Err(err).Msg("failed to load plan") + errstring := err.Error() + + if strings.Contains(errstring, "cannot find package") && strings.Contains(errstring, "alpha.dagger.io") { + lg.Fatal().Msg("Attempting to load a 0.1.0 plan. Please upgrade your plan to use the latest version of dagger. Contact the Dagger team if you need help!") + } else { + lg.Fatal().Err(err).Msg("failed to load plan") + } } target := getTargetPath(args)