From a3482b6c9f4223aa3e4adcf770ac617ef1180050 Mon Sep 17 00:00:00 2001 From: Katy Moe Date: Fri, 15 Jul 2022 11:14:30 +0100 Subject: [PATCH] fix panic on state access --- internal/command/show.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/command/show.go b/internal/command/show.go index 0b16ee735285..123b86536eab 100644 --- a/internal/command/show.go +++ b/internal/command/show.go @@ -151,7 +151,7 @@ func (c *ShowCommand) showFromLatestStateSnapshot() (*statefile.File, tfdiags.Di // Get the latest state snapshot from the backend for the current workspace stateFile, stateErr := getStateFromBackend(b, workspace) if stateErr != nil { - diags = diags.Append(stateErr.Error()) + diags = diags.Append(stateErr) return nil, diags }