From d9669216b6efd2475c5ded8cddcd5cd0a5b724ab Mon Sep 17 00:00:00 2001 From: guillaume Date: Tue, 23 Nov 2021 23:47:57 +0100 Subject: [PATCH] Fix regression in error printing when Wrong Cue parsing Signed-off-by: guillaume --- cmd/dagger/cmd/compute.go | 2 +- cmd/dagger/cmd/edit.go | 2 +- cmd/dagger/cmd/input/list.go | 2 +- cmd/dagger/cmd/input/root.go | 2 +- cmd/dagger/cmd/output/list.go | 2 +- cmd/dagger/cmd/up.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/dagger/cmd/compute.go b/cmd/dagger/cmd/compute.go index b3e4ab48..320d87be 100644 --- a/cmd/dagger/cmd/compute.go +++ b/cmd/dagger/cmd/compute.go @@ -195,7 +195,7 @@ var computeCmd = &cobra.Command{ env, err := environment.New(st) if err != nil { - lg.Fatal().Msg("unable to create environment") + lg.Fatal().Err(err).Msg("unable to create environment") } err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error { diff --git a/cmd/dagger/cmd/edit.go b/cmd/dagger/cmd/edit.go index 3a229e79..a80a2343 100644 --- a/cmd/dagger/cmd/edit.go +++ b/cmd/dagger/cmd/edit.go @@ -79,7 +79,7 @@ var editCmd = &cobra.Command{ env, err := environment.New(st) if err != nil { - lg.Fatal().Msg("unable to create environment") + lg.Fatal().Err(err).Msg("unable to create environment") } cl := common.NewClient(ctx) diff --git a/cmd/dagger/cmd/input/list.go b/cmd/dagger/cmd/input/list.go index 5661438d..e66aac28 100644 --- a/cmd/dagger/cmd/input/list.go +++ b/cmd/dagger/cmd/input/list.go @@ -43,7 +43,7 @@ var listCmd = &cobra.Command{ env, err := environment.New(st) if err != nil { - lg.Fatal().Msg("unable to create environment") + lg.Fatal().Err(err).Msg("unable to create environment") } cl := common.NewClient(ctx) diff --git a/cmd/dagger/cmd/input/root.go b/cmd/dagger/cmd/input/root.go index b52f6c8a..57b1a785 100644 --- a/cmd/dagger/cmd/input/root.go +++ b/cmd/dagger/cmd/input/root.go @@ -55,7 +55,7 @@ func updateEnvironmentInput(ctx context.Context, cmd *cobra.Command, target stri env, err := environment.New(st) if err != nil { - lg.Fatal().Msg("unable to create environment") + lg.Fatal().Err(err).Msg("unable to create environment") } cl := common.NewClient(ctx) diff --git a/cmd/dagger/cmd/output/list.go b/cmd/dagger/cmd/output/list.go index 3b910bda..36887693 100644 --- a/cmd/dagger/cmd/output/list.go +++ b/cmd/dagger/cmd/output/list.go @@ -42,7 +42,7 @@ var listCmd = &cobra.Command{ env, err := environment.New(st) if err != nil { - lg.Fatal().Msg("unable to create environment") + lg.Fatal().Err(err).Msg("unable to create environment") } cl := common.NewClient(ctx) diff --git a/cmd/dagger/cmd/up.go b/cmd/dagger/cmd/up.go index 1e8cd38e..947647cb 100644 --- a/cmd/dagger/cmd/up.go +++ b/cmd/dagger/cmd/up.go @@ -63,7 +63,7 @@ var upCmd = &cobra.Command{ env, err := environment.New(st) if err != nil { - lg.Fatal().Msg("unable to create environment") + lg.Fatal().Err(err).Msg("unable to create environment") } err = cl.Do(ctx, env.Context(), func(ctx context.Context, s solver.Solver) error {