From 70f45b584d8386f98b0b42612f0fbd42cada9f89 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 8 Aug 2024 17:29:40 +0200 Subject: [PATCH] Fix problem in tramp-container.el * lisp/net/tramp-container.el (tramp-kubernetes--context-namespace): Handle nil list elements. (cherry picked from commit 8b662047074f7413c280c9092d1c39763f8b0e5b) --- lisp/net/tramp-container.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el index 57c34a1b8e4..fd82e4516b8 100644 --- a/lisp/net/tramp-container.el +++ b/lisp/net/tramp-container.el @@ -419,10 +419,11 @@ Obey `tramp-kubernetes-context'" "The kubectl options for context and namespace as string." (mapconcat #'identity - `(,(when-let ((context (tramp-kubernetes--current-context vec))) - (format "--context=%s" context)) - ,(when-let ((namespace (tramp-kubernetes--namespace vec))) - (format "--namespace=%s" namespace))) + (delq nil + `(,(when-let ((context (tramp-kubernetes--current-context vec))) + (format "--context=%s" context)) + ,(when-let ((namespace (tramp-kubernetes--namespace vec))) + (format "--namespace=%s" namespace)))) " ")) ;;;###tramp-autoload -- 2.39.2