From 0a08768fd8357093624eaa2a8ab540882346557f Mon Sep 17 00:00:00 2001 From: cds111 Date: Mon, 1 Sep 2025 17:11:08 +0300 Subject: [PATCH] Add d8 cli version in errors output --- cmd/root.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 7436ada7..0def7c0f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -86,12 +86,15 @@ func Execute() { if err := rootCmd.Execute(); err != nil { if helm_v3.IsPluginError(err) { + fmt.Fprintf(os.Stderr, "d8 version %s\n", Version) werfcommon.ShutdownTelemetry(ctx, helm_v3.PluginErrorCode(err)) werfcommon.TerminateWithError(err.Error(), helm_v3.PluginErrorCode(err)) } else if errors.Is(err, resrcchangcalc.ErrChangesPlanned) { + fmt.Fprintf(os.Stderr, "d8 version %s\n", Version) werfcommon.ShutdownTelemetry(ctx, 2) os.Exit(2) } else { + fmt.Fprintf(os.Stderr, "d8 version %s\n", Version) werfcommon.ShutdownTelemetry(ctx, 1) werfcommon.TerminateWithError(err.Error(), 1) }