mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
direnv: fix nushell cell-path handling (#7339)
After https://github.com/nushell/nushell/pull/15692, this integration breaks $PATH conversions again as cell-paths are now case-sensitive.
This commit is contained in:
@@ -187,13 +187,13 @@ in
|
||||
| items {|key, value|
|
||||
let value = do (
|
||||
{
|
||||
"path": {
|
||||
"PATH": {
|
||||
from_string: {|s| $s | split row (char esep) | path expand --no-symlink }
|
||||
to_string: {|v| $v | path expand --no-symlink | str join (char esep) }
|
||||
}
|
||||
}
|
||||
| merge ($env.ENV_CONVERSIONS? | default {})
|
||||
| get -i $key
|
||||
| get -i ([[value, optional, insensitive]; [$key, false, true]] | into cell-path)
|
||||
| get -i from_string
|
||||
| if ($in | is-empty) { {|x| $x} } else { $in }
|
||||
) $value
|
||||
|
||||
Reference in New Issue
Block a user