mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
home-environment: prepend to PATH in sessionPath
This makes the options behave as people expect it to: one's personal configuration can shadow system executables. Closes #3324.
This commit is contained in:
parent
993fb02d20
commit
e5471d3145
2 changed files with 2 additions and 2 deletions
|
@ -556,7 +556,7 @@ in
|
|||
|
||||
${config.lib.shell.exportAll cfg.sessionVariables}
|
||||
'' + lib.optionalString (cfg.sessionPath != [ ]) ''
|
||||
export PATH="$PATH''${PATH:+:}${concatStringsSep ":" cfg.sessionPath}"
|
||||
export PATH="${concatStringsSep ":" cfg.sessionPath}''${PATH:+:}$PATH"
|
||||
'' + cfg.sessionVariablesExtra;
|
||||
};
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
hmSessVars=home-path/etc/profile.d/hm-session-vars.sh
|
||||
assertFileExists $hmSessVars
|
||||
assertFileContains $hmSessVars \
|
||||
'export PATH="$PATH''${PATH:+:}bar:baz:foo"'
|
||||
'export PATH="bar:baz:foo''${PATH:+:}$PATH"'
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue