mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
mise: disable shell integration when package == null
There's a warning already in place for this, but instead of skipping the shell integration the build process would fail due to `lib.getExe` being passed a null value.
This commit is contained in:
parent
3cb08dd360
commit
3f47f72c97
1 changed files with 4 additions and 4 deletions
|
|
@ -116,19 +116,19 @@ in
|
|||
};
|
||||
|
||||
programs = {
|
||||
bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
bash.initExtra = mkIf (cfg.enableBashIntegration && cfg.package != null) ''
|
||||
eval "$(${getExe cfg.package} activate bash)"
|
||||
'';
|
||||
|
||||
zsh.initContent = mkIf cfg.enableZshIntegration ''
|
||||
zsh.initContent = mkIf (cfg.enableZshIntegration && cfg.package != null) ''
|
||||
eval "$(${getExe cfg.package} activate zsh)"
|
||||
'';
|
||||
|
||||
fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
fish.interactiveShellInit = mkIf (cfg.enableFishIntegration && cfg.package != null) ''
|
||||
${getExe cfg.package} activate fish | source
|
||||
'';
|
||||
|
||||
nushell = mkIf cfg.enableNushellIntegration {
|
||||
nushell = mkIf (cfg.enableNushellIntegration && cfg.package != null) {
|
||||
extraEnv = ''
|
||||
let mise_path = $nu.default-config-dir | path join mise.nu
|
||||
^mise activate nu | save $mise_path --force
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue