Do not pass non-string env vars to externals (#4748)

* Do not pass non-string env vars to externals

Also misc cleanup

* Add note to default config

* Add a test

* Ensure PATH/Path conversion list <-> string
This commit is contained in:
Jakub Žádník
2022-03-12 00:18:39 +02:00
committed by GitHub
parent f3626f7c3a
commit 90b2ec537f
9 changed files with 154 additions and 44 deletions

View File

@ -28,6 +28,7 @@ let-env PROMPT_MULTILINE_INDICATOR = "::: "
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running extrnal commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
let-env ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) }