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:
Kira
2025-06-30 15:49:04 -03:00
committed by GitHub
parent ee2189cb2f
commit 78fc50f1cf

View File

@@ -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