forked from extern/nushell
Improve "Cannot convert argument to string" msg (#7161)
This commit is contained in:
parent
1784b4bf50
commit
2dd4cb9f7d
@ -64,7 +64,7 @@ impl Command for External {
|
|||||||
.map(|item| Spanned { item, span })
|
.map(|item| Spanned { item, span })
|
||||||
.map_err(|_| {
|
.map_err(|_| {
|
||||||
ShellError::ExternalCommand(
|
ShellError::ExternalCommand(
|
||||||
"Cannot convert argument to a string".into(),
|
format!("Cannot convert {} to a string", value.get_type()),
|
||||||
"All arguments to an external command need to be string-compatible".into(),
|
"All arguments to an external command need to be string-compatible".into(),
|
||||||
span,
|
span,
|
||||||
)
|
)
|
||||||
@ -267,7 +267,7 @@ impl ExternalCommand {
|
|||||||
Some(s) => {
|
Some(s) => {
|
||||||
if reconfirm_command_name {
|
if reconfirm_command_name {
|
||||||
format!(
|
format!(
|
||||||
"'{}' was not found, did you mean '{s}'?",
|
"'{}' was not found; did you mean '{s}'?",
|
||||||
self.name.item
|
self.name.item
|
||||||
)
|
)
|
||||||
} else if self.name.item == s {
|
} else if self.name.item == s {
|
||||||
|
Loading…
Reference in New Issue
Block a user