Skip to content

Commit 8e52692

Browse files
committed
Make panic message more explicit
1 parent c7c839d commit 8e52692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/command/views/workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (v *WorkspaceJSON) List(current string, list []string, diags tfdiags.Diagno
8484
jsonOutput, err := json.MarshalIndent(output, "", " ")
8585
if err != nil {
8686
// Should never happen because we fully-control the input here
87-
panic(err)
87+
panic(fmt.Sprintf("failed to marshal workspace list json output: %v", err))
8888
}
8989

9090
v.view.streams.Println(string(jsonOutput))

0 commit comments

Comments
 (0)