Use fallback environment instead of base

This commit is contained in:
claytharrison 2024-12-21 21:28:58 +01:00
parent 4ffe110f79
commit 9d2e9fce93

View file

@ -68,6 +68,9 @@
"Whether to activate the base environment by default if no other is preferred. "Whether to activate the base environment by default if no other is preferred.
Default nil." Default nil."
:type 'boolean :type 'boolean
(defcustom micromamba-fallback-environment nil
"An environment that micromamba.el activates by default."
:type 'string
:group 'micromamba) :group 'micromamba)
(defcustom micromamba-preactivate-hook nil (defcustom micromamba-preactivate-hook nil
@ -233,10 +236,7 @@ Returns an alist with the following keys:
(when working-dir (when working-dir
(or (or
(micromamba--get-name-from-env-yml (micromamba--find-env-yml working-dir)) (micromamba--get-name-from-env-yml (micromamba--find-env-yml working-dir))
(when (or micromamba-fallback-environment))))
micromamba-activate-base-by-default
(alist-get 'auto_activate_base (micromamba--get-config)))
"base")))))
(defun micromamba--get-activation-parameters (prefix) (defun micromamba--get-activation-parameters (prefix)
"Get activation parameters for the environment PREFIX. "Get activation parameters for the environment PREFIX.