mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 12:25:58 +02:00
fix std log (#12470)
related to - https://github.com/nushell/nushell/pull/12196 # Description while i'm 100% okey with the original intent behind https://github.com/nushell/nushell/pull/12196, i think the PR did introduce two unintended things: - extra parentheses that make the `log.nu` module look like Lisp lol - a renaming of the `NU_LOG_LEVEL` environment variable to `NU_log-level`. this breaks previous usage of `std log` and, as it's not mentionned at all in the PR, i thought it was not intentional 😋 # User-Facing Changes users can now control `std log` with `$env.NU_LOG_LEVEL` # Tests + Formatting the "log" tests have been fixed as well. # After Submitting
This commit is contained in:
@ -6,9 +6,9 @@ def run [
|
||||
--short
|
||||
] {
|
||||
if $short {
|
||||
^$nu.current-exe --no-config-file --commands $'use std; NU_log-level=($system_level) std log ($message_level) --short "test message"'
|
||||
^$nu.current-exe --no-config-file --commands $'use std; NU_LOG_LEVEL=($system_level) std log ($message_level) --short "test message"'
|
||||
} else {
|
||||
^$nu.current-exe --no-config-file --commands $'use std; NU_log-level=($system_level) std log ($message_level) "test message"'
|
||||
^$nu.current-exe --no-config-file --commands $'use std; NU_LOG_LEVEL=($system_level) std log ($message_level) "test message"'
|
||||
}
|
||||
| complete | get --ignore-errors stderr
|
||||
}
|
||||
|
Reference in New Issue
Block a user