mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue