direnv: update nushell env conversion logic (#7015)

This commit is contained in:
jaredmontoya
2025-05-12 22:28:52 +02:00
committed by GitHub
parent 0b24658ec0
commit f0a7db5ec1

View File

@@ -186,8 +186,13 @@ in
| default {}
| items {|key, value|
let value = do (
$env.ENV_CONVERSIONS?
| default {}
{
"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 from_string
| default {|x| $x}