mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
throw an error instead of a panic if no input is provided to inspect
(#9259)
# Description This is a small PR to fix Nu crashing when calling `inspect` with no data piped in(#9255). # User-Facing Changes none.
This commit is contained in:
7
crates/nu-command/tests/commands/inspect.rs
Normal file
7
crates/nu-command/tests/commands/inspect.rs
Normal file
@ -0,0 +1,7 @@
|
||||
use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn inspect_with_empty_pipeline() {
|
||||
let actual = nu!("inspect");
|
||||
assert!(actual.err.contains("no input value was piped in"));
|
||||
}
|
@ -37,6 +37,7 @@ mod headers;
|
||||
mod help;
|
||||
mod histogram;
|
||||
mod insert;
|
||||
mod inspect;
|
||||
mod into_filesize;
|
||||
mod into_int;
|
||||
mod join;
|
||||
|
Reference in New Issue
Block a user