From aec8edbe61fa3d8ffbf26152e28bb945c8fabeb0 Mon Sep 17 00:00:00 2001 From: ItamarYuran <95186982+ItamarYuran@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:11:59 +0200 Subject: [PATCH] Fix: lakectl identity nil email panic (#8342) --- cmd/lakectl/cmd/identity.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/lakectl/cmd/identity.go b/cmd/lakectl/cmd/identity.go index c4a2696180c..0be06b34877 100644 --- a/cmd/lakectl/cmd/identity.go +++ b/cmd/lakectl/cmd/identity.go @@ -28,13 +28,16 @@ var identityCmd = &cobra.Command{ id := resp.JSON200.User.Id CreationDate := resp.JSON200.User.CreationDate - email := resp.JSON200.User.Email + email := "" + if resp.JSON200.User.Email != nil { + email = *resp.JSON200.User.Email + } Write(userInfoTemplate, struct { UserID string Email string CreationDate int64 - }{UserID: id, CreationDate: CreationDate, Email: *email}) + }{UserID: id, CreationDate: CreationDate, Email: email}) }, }