Open d33tah opened 2 years ago
Consider the output of the following command:
$ cat /dev/null | xsv select 1 Selector index 1 is out of bounds. Index must be >= 1 and <= 0.
This might happen in practice when xsv is being fed data from a broken script. It looks like this is the relevant piece of code:
https://github.com/BurntSushi/xsv/blob/3de6c04269a7d315f7e9864b9013451cd9580a08/src/select.rs#L315
Perhaps it would make sense to catch this specific error case and throw an error like "input file is empty"?
Consider the output of the following command:
This might happen in practice when xsv is being fed data from a broken script. It looks like this is the relevant piece of code:
https://github.com/BurntSushi/xsv/blob/3de6c04269a7d315f7e9864b9013451cd9580a08/src/select.rs#L315
Perhaps it would make sense to catch this specific error case and throw an error like "input file is empty"?