]> git.eshelyaron.com Git - emacs.git/commitdiff
kubed.el: Fix "D" command in resource list buffers
authorEshel Yaron <me@eshelyaron.com>
Tue, 23 Jul 2024 19:17:52 +0000 (21:17 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 23 Jul 2024 19:17:52 +0000 (21:17 +0200)
lisp/net/kubed.el

index f36ebae9b23b0ce83ca2570ce092dd0c83a44f62..c8e82dcdbfc3b966b97ae1af56c658ce5a89dceb 100644 (file)
@@ -197,7 +197,7 @@ namespaceless resource type, put `:namespaced nil' before COMMANDS:
       (cond
        ((eq keyword :namespaced) (setq namespaced (pop commands)))
        ((eq keyword :create)     (setq crt-spec   (pop commands)))
-       ;; FIXME: Add error for unknown keywords
+       ;; FIXME: Add error for unknown keywords.
        (t (pop commands))))
 
     ;; Extend `commands' with standard commands.
@@ -484,10 +484,10 @@ Optional argument DEFAULT is the minibuffer default argument." resource)
                                        (symbol-name resource)
                                        " `%s' in namespace `%s'...")
                               name space)
-                     (if (zerop (apply #'call-process
-                                       kubed-kubectl-executable nil nil nil
-                                       "delete" "--namespace" space
-                                       ,(symbol-name plrl-var) name))
+                     (if (zerop (call-process
+                                 kubed-kubectl-executable nil nil nil
+                                 "delete" "--namespace" space
+                                 ,(symbol-name plrl-var) name))
                          (message ,(concat "Deleting Kubernetes "
                                            (symbol-name resource)
                                            " `%s' in namespace `%s'... Done.")
@@ -495,22 +495,22 @@ Optional argument DEFAULT is the minibuffer default argument." resource)
                        (error ,(concat "Failed to delete Kubernetes"
                                        (symbol-name resource)
                                        " `%s' in namespace `%s'")
-                              name space))))
-               (message ,(concat "Deleting Kubernetes "
-                                 (symbol-name plrl-var)
-                                 " `%s'...")
-                        (string-join ,plrl-var "', `"))
-               (if (zerop (apply #'call-process
-                                 kubed-kubectl-executable nil nil nil
-                                 "delete" ,(symbol-name plrl-var) ,plrl-var))
-                   (message ,(concat "Deleting Kubernetes "
-                                     (symbol-name plrl-var)
-                                     " `%s'... Done.")
-                            (string-join ,plrl-var "', `"))
-                 (error ,(concat "Failed to delete Kubernetes"
-                                 (symbol-name plrl-var)
-                                 " `%s'")
-                        (string-join ,plrl-var "', `"))))
+                              name space)))
+                 (message ,(concat "Deleting Kubernetes "
+                                   (symbol-name plrl-var)
+                                   " `%s'...")
+                          (string-join ,plrl-var "', `"))
+                 (if (zerop (apply #'call-process
+                                   kubed-kubectl-executable nil nil nil
+                                   "delete" ,(symbol-name plrl-var) ,plrl-var))
+                     (message ,(concat "Deleting Kubernetes "
+                                       (symbol-name plrl-var)
+                                       " `%s'... Done.")
+                              (string-join ,plrl-var "', `"))
+                   (error ,(concat "Failed to delete Kubernetes"
+                                   (symbol-name plrl-var)
+                                   " `%s'")
+                          (string-join ,plrl-var "', `")))))
           `(defun ,dlt-name (,plrl-var)
              ,(format "Delete Kubernetes %S %s." plrl-var
                       (upcase (symbol-name plrl-var)))