Print error for 0.1.0 plans being loaded

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine 2022-03-10 14:53:37 -07:00
parent 102ec55d4e
commit 2d4b6ef2ee

View File

@ -58,7 +58,13 @@ var doCmd = &cobra.Command{
p, err := loadPlan() p, err := loadPlan()
if err != nil { 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) target := getTargetPath(args)