mirror of
https://github.com/nushell/nushell
synced 2024-11-10 15:14:14 +00:00
Improve missing param error span (#4560)
This commit is contained in:
parent
a32ce93c79
commit
9ea5a2ecd3
1 changed files with 8 additions and 2 deletions
|
@ -114,7 +114,10 @@ pub fn check_call(command: Span, sig: &Signature, call: &Call) -> Option<ParseEr
|
|||
} else {
|
||||
return Some(ParseError::MissingPositional(
|
||||
argument.name.clone(),
|
||||
command,
|
||||
Span {
|
||||
start: command.end,
|
||||
end: command.end,
|
||||
},
|
||||
sig.call_signature(),
|
||||
));
|
||||
}
|
||||
|
@ -134,7 +137,10 @@ pub fn check_call(command: Span, sig: &Signature, call: &Call) -> Option<ParseEr
|
|||
} else {
|
||||
Some(ParseError::MissingPositional(
|
||||
missing.name.clone(),
|
||||
command,
|
||||
Span {
|
||||
start: command.end,
|
||||
end: command.end,
|
||||
},
|
||||
sig.call_signature(),
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue