mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 23:11:53 +02:00
update miette and switch to GenericErrors (#5222)
This commit is contained in:
@ -16,7 +16,7 @@ nu-ansi-term = "0.45.1"
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.61.1" }
|
||||
|
||||
crossterm = "0.23.0"
|
||||
miette = { version = "4.4.0", features = ["fancy"] }
|
||||
miette = { version = "4.5.0", features = ["fancy"] }
|
||||
thiserror = "1.0.29"
|
||||
reedline = { version = "0.4.0", features = ["bashisms"]}
|
||||
|
||||
|
@ -262,7 +262,7 @@ pub fn evaluate_repl(
|
||||
|
||||
report_error(
|
||||
&working_set,
|
||||
&ShellError::DirectoryNotFound(tokens.0[0].span),
|
||||
&ShellError::DirectoryNotFound(tokens.0[0].span, None),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -106,9 +106,12 @@ fn gather_env_vars(vars: impl Iterator<Item = (String, String)>, engine_state: &
|
||||
let working_set = StateWorkingSet::new(engine_state);
|
||||
report_error(
|
||||
&working_set,
|
||||
&ShellError::LabeledError(
|
||||
&ShellError::GenericError(
|
||||
format!("Environment variable was not captured: {}", env_str),
|
||||
msg.into(),
|
||||
"".to_string(),
|
||||
None,
|
||||
Some(msg.into()),
|
||||
Vec::new(),
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -152,9 +155,12 @@ fn gather_env_vars(vars: impl Iterator<Item = (String, String)>, engine_state: &
|
||||
let working_set = StateWorkingSet::new(engine_state);
|
||||
report_error(
|
||||
&working_set,
|
||||
&ShellError::LabeledError(
|
||||
&ShellError::GenericError(
|
||||
"Current directory not found".to_string(),
|
||||
format!("Retrieving current directory failed: {:?}", e),
|
||||
"".to_string(),
|
||||
None,
|
||||
Some(format!("Retrieving current directory failed: {:?}", e)),
|
||||
Vec::new(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user