mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
Convert ShellError::CommandNotFound to named fields (#11094)
# Description Part of #10700
This commit is contained in:
@ -95,7 +95,7 @@ You can also learn more at https://www.nushell.sh/book/"#;
|
||||
result
|
||||
};
|
||||
|
||||
let result = if let Err(ShellError::CommandNotFound(_)) = result {
|
||||
let result = if let Err(ShellError::CommandNotFound { .. }) = result {
|
||||
help_modules(engine_state, stack, call)
|
||||
} else {
|
||||
result
|
||||
|
@ -114,10 +114,9 @@ pub fn help_commands(
|
||||
.into_pipeline_data(),
|
||||
)
|
||||
} else {
|
||||
Err(ShellError::CommandNotFound(span(&[
|
||||
rest[0].span,
|
||||
rest[rest.len() - 1].span,
|
||||
])))
|
||||
Err(ShellError::CommandNotFound {
|
||||
span: span(&[rest[0].span, rest[rest.len() - 1].span]),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,10 +133,9 @@ pub fn help_externs(
|
||||
.into_pipeline_data(),
|
||||
)
|
||||
} else {
|
||||
Err(ShellError::CommandNotFound(span(&[
|
||||
rest[0].span,
|
||||
rest[rest.len() - 1].span,
|
||||
])))
|
||||
Err(ShellError::CommandNotFound {
|
||||
span: span(&[rest[0].span, rest[rest.len() - 1].span]),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user