Skip to content

Commit 0de3690

Browse files
committed
fix: added detail errors back
1 parent 88499ce commit 0de3690

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/project/ssh.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ func getPodSSHInfo(podID string) (string, int, error) {
3535
if pod.DesiredStatus != "RUNNING" {
3636
return "", 0, fmt.Errorf("pod desired status not RUNNING")
3737
}
38-
if pod.Runtime == nil || pod.Runtime.Ports == nil {
39-
return "", 0, fmt.Errorf("pod runtime information is missing")
38+
if pod.Runtime == nil {
39+
return "", 0, fmt.Errorf("pod runtime is missing")
40+
}
41+
if pod.Runtime.Ports == nil {
42+
return "", 0, fmt.Errorf("pod runtime ports are missing")
4043
}
4144
for _, port := range pod.Runtime.Ports {
4245
if port.PrivatePort == 22 {

0 commit comments

Comments
 (0)