nushell/crates/nu-command
WindSoilder f043a8a8ff
redirect should have a target (#10835)
# Description
Fixes:  #10830 

The issue happened during lite-parsing, when we want to put a
`LiteElement` to a `LitePipeline`, we do nothing if relative redirection
target is empty.

So the command `echo aaa o> | ignore` will be interpreted to `echo aaa |
ignore`.

This pr is going to check and return an error if redirection target is
empty.

# User-Facing Changes
## Before
```
❯ echo aaa o> | ignore   # nothing happened
```

## After
```nushell
❯ echo aaa o> | ignore
Error: nu::parser::parse_mismatch

  × Parse mismatch during operation.
   ╭─[entry #1:1:1]
 1 │ echo aaa o> | ignore
   ·          ─┬
   ·           ╰── expected redirection target
   ╰────
```
2023-10-25 11:19:35 +02:00
..
src fix: Ensure consistent vals and cols when parsing with --flexible (#10814) 2023-10-24 15:54:26 -05:00
tests redirect should have a target (#10835) 2023-10-25 11:19:35 +02:00
Cargo.toml Revert "Bump regex from 1.9.6 to 1.10.2" (#10818) 2023-10-23 09:11:32 -05:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00