nushell/crates/nu-command
Antoine Stevan 202dfdaee2
fix panic with lines on an error (#9967)
should close https://github.com/nushell/nushell/issues/9965

# Description
this PR implements the `todo!()` left in `lines`.

# User-Facing Changes
### before
```nushell
> open . | lines
thread 'main' panicked at 'not yet implemented', crates/nu-command/src/filters/lines.rs:248:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

### after
```nushell
> open . | lines
Error: nu:🐚:io_error

  × I/O error
  help: Is a directory (os error 21)
```

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
-  `toolkit test`
-  `toolkit test stdlib`

this PR adds the `lines_on_error` test to make sure this does not happen
again 😌

# After Submitting
2023-08-09 14:12:58 +02:00
..
src fix panic with lines on an error (#9967) 2023-08-09 14:12:58 +02:00
tests fix panic with lines on an error (#9967) 2023-08-09 14:12:58 +02:00
Cargo.toml Bump rstest from 0.17.0 to 0.18.1 (#9782) 2023-08-08 17:11:05 +00:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00