mirror of
https://github.com/nushell/nushell.git
synced 2025-01-10 16:28:50 +01:00
fix NotAConstant
error help message (#8293)
``` Error: nu::parser::not_a_constant (link) × Not a constant. ╭─[entry #23:1:1] 1 │ let file = "/home/user/file"; source $file · ──┬── · ╰── Value is not a parse-time constant ╰──── help: Only a subset of expressions are allowed constants during parsing. Try using the 'let' command or typing the value literally. ``` this pr changes the help message to 'Try using the `const` command ...'
This commit is contained in:
parent
c1d76bfac7
commit
e01eb42e74
@ -393,7 +393,7 @@ pub enum ParseError {
|
||||
#[error("Not a constant.")]
|
||||
#[diagnostic(
|
||||
code(nu::parser::not_a_constant),
|
||||
help("Only a subset of expressions are allowed constants during parsing. Try using the 'let' command or typing the value literally.")
|
||||
help("Only a subset of expressions are allowed constants during parsing. Try using the 'const' command or typing the value literally.")
|
||||
)]
|
||||
NotAConstant(#[label = "Value is not a parse-time constant"] Span),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user