]> git.eshelyaron.com Git - kubed.git/commitdiff
; Fix 'kubed-kubectl-command' error when 'transient' is not loaded
authorEshel Yaron <me@eshelyaron.com>
Mon, 29 Jul 2024 10:33:54 +0000 (12:33 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 29 Jul 2024 10:33:54 +0000 (12:33 +0200)
kubed.el

index 633df978a19e9b657652882b428cecb46a142be8..44319e7e9fa8f89b4cb92cfdaed82266bbb9528f 100644 (file)
--- a/kubed.el
+++ b/kubed.el
@@ -1930,8 +1930,11 @@ Interactively, prompt for COMMAND with completion for `kubectl' arguments."
           "Command: "
           (concat
            kubed-kubectl-program " "
-           (let ((args (kubed-transient-args))
-                 (scope (and (fboundp 'transient-scope) (transient-scope))))
+           (let* ((args (kubed-transient-args))
+                  (prefix (and (fboundp 'transient-prefix-object)
+                               (transient-prefix-object)))
+                  (scope (and prefix (fboundp 'eieio-oref)
+                              (eieio-oref prefix 'scope))))
              (when (or args scope)
                (concat (string-join (append scope args) " ") " "))))
           'kubed-kubectl-command-history)))