mirror of
https://github.com/nushell/nushell.git
synced 2025-01-11 08:48:23 +01:00
Improve missing param error span (#4560)
This commit is contained in:
parent
a32ce93c79
commit
9ea5a2ecd3
@ -114,7 +114,10 @@ pub fn check_call(command: Span, sig: &Signature, call: &Call) -> Option<ParseEr
|
|||||||
} else {
|
} else {
|
||||||
return Some(ParseError::MissingPositional(
|
return Some(ParseError::MissingPositional(
|
||||||
argument.name.clone(),
|
argument.name.clone(),
|
||||||
command,
|
Span {
|
||||||
|
start: command.end,
|
||||||
|
end: command.end,
|
||||||
|
},
|
||||||
sig.call_signature(),
|
sig.call_signature(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -134,7 +137,10 @@ pub fn check_call(command: Span, sig: &Signature, call: &Call) -> Option<ParseEr
|
|||||||
} else {
|
} else {
|
||||||
Some(ParseError::MissingPositional(
|
Some(ParseError::MissingPositional(
|
||||||
missing.name.clone(),
|
missing.name.clone(),
|
||||||
command,
|
Span {
|
||||||
|
start: command.end,
|
||||||
|
end: command.end,
|
||||||
|
},
|
||||||
sig.call_signature(),
|
sig.call_signature(),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user