Skip to content

Commit 68830be

Browse files
committed
[gpctl] Fix "workspaces list"
1 parent 5e1d3e3 commit 68830be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dev/gpctl/cmd/workspaces-list.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ var workspacesListCmd = &cobra.Command{
5656
pod = fmt.Sprintf("imagebuild-%s", w.GetId())
5757
}
5858

59+
var nodeName string
60+
if w.Runtime != nil {
61+
nodeName = w.Runtime.NodeName
62+
}
5963
out = append(out, PrintWorkspace{
6064
Owner: w.GetMetadata().GetOwner(),
6165
WorkspaceID: w.GetMetadata().GetMetaId(),
@@ -64,7 +68,7 @@ var workspacesListCmd = &cobra.Command{
6468
Type: w.GetSpec().GetType().String(),
6569
Pod: pod,
6670
Active: w.GetConditions().FirstUserActivity != nil,
67-
Node: w.Runtime.NodeName,
71+
Node: nodeName,
6872
})
6973
}
7074

0 commit comments

Comments
 (0)