mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 04:48:20 +02:00
Convert ShellError::UnsupportedInput to named fields (#10971)
# Description This is easy to do with rust-analyzer, but I didn't want to just pump these all out without feedback. Part of #10700 # User-Facing Changes None # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
12
crates/nu-command/src/env/load_env.rs
vendored
12
crates/nu-command/src/env/load_env.rs
vendored
@ -81,12 +81,12 @@ impl Command for LoadEnv {
|
||||
}
|
||||
Ok(PipelineData::empty())
|
||||
}
|
||||
_ => Err(ShellError::UnsupportedInput(
|
||||
"'load-env' expects a single record".into(),
|
||||
"value originated from here".into(),
|
||||
span,
|
||||
input.span().unwrap_or(span),
|
||||
)),
|
||||
_ => Err(ShellError::UnsupportedInput {
|
||||
msg: "'load-env' expects a single record".into(),
|
||||
input: "value originated from here".into(),
|
||||
msg_span: span,
|
||||
input_span: input.span().unwrap_or(span),
|
||||
}),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user