Skip to content

Commit

Permalink
fix: Consider that no line is like no data and one empty header line (a…
Browse files Browse the repository at this point in the history
…brochard#105)

Or else the code that parses the header will complain about not
being able to deal with nil, the car of the lines.
  • Loading branch information
Konubinix authored Nov 12, 2022
1 parent 4bd0c62 commit ca6c3f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kubel.el
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ ENTRYLIST is the output of the parsed body."
"Parse the body of kubectl get resource call into a list.
BODY is the raw output of kubectl get resource."
(let* ((lines (nbutlast (split-string body "\n")))
(let* ((lines (or (nbutlast (split-string body "\n")) '("")))
(header (car lines))
;; Cronjobs have a "LAST SCHEDULE" column, so need to split on 2+ whitespace chars.
(starts (cl-loop for start = 0 then (match-end 0)
Expand Down

0 comments on commit ca6c3f8

Please sign in to comment.