forked from extern/nushell
Fix panic when assigning value to $env (#7894)
This commit is contained in:
@ -365,6 +365,20 @@ Either make sure {0} is a string, or add a 'to_string' entry for it in ENV_CONVE
|
||||
)]
|
||||
AutomaticEnvVarSetManually(String, #[label("cannot set '{0}' manually")] Span),
|
||||
|
||||
/// It is not possible to replace the entire environment at once
|
||||
///
|
||||
/// ## Resolution
|
||||
///
|
||||
/// Setting the entire environment is not allowed. Change environment variables individually
|
||||
/// instead.
|
||||
#[error("Cannot replace environment.")]
|
||||
#[diagnostic(
|
||||
code(nu::shell::cannot_replace_env),
|
||||
url(docsrs),
|
||||
help(r#"Assigning a value to $env is not allowed."#)
|
||||
)]
|
||||
CannotReplaceEnv(#[label("setting $env not allowed")] Span),
|
||||
|
||||
/// Division by zero is not a thing.
|
||||
///
|
||||
/// ## Resolution
|
||||
|
Reference in New Issue
Block a user