nushell/crates/nu-command/src
WindSoilder 046e46b962
avoid panic when using from nuon (#7533)
# Description

Fixes #5996 

Just found a relative easy way to fix the issue

# User-Facing Changes

```
❯ open $nu.plugin-path | from nuon
Error:
  × error when loading nuon text
   ╭─[entry #36:1:1]
 1 │ open $nu.plugin-path | from nuon
   ·                        ────┬────
   ·                            ╰── could not load nuon text
   ╰────

Error:
  × Error when loading


❯ open $nu.config-path | from nuon
Error:
  × error when loading nuon text
   ╭─[entry #37:1:1]
 1 │ open $nu.config-path | from nuon
   ·                        ────┬────
   ·                            ╰── could not load nuon text
   ╰────

Error:
  × error when loading
```

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2022-12-21 16:42:23 -08:00
..
bits Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
bytes Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
charting Remove unnecessary echo uses from examples (#7500) 2022-12-16 11:51:00 -05:00
conversions Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
core_commands Initial support for parse-time constants (#7436) 2022-12-22 00:21:03 +02:00
database Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
dataframe Reduced LOC by replacing several instances of Value::Int {}, Value::Float{}, Value::Bool {}, and Value::String {} with Value::int(), Value::float(), Value::boolean() and Value::string() (#7412) 2022-12-09 11:37:51 -05:00
date Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
deprecated Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
env Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
experimental Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
filesystem Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
filters Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
formats avoid panic when using from nuon (#7533) 2022-12-21 16:42:23 -08:00
generators remove example missed from an earlier refactor (#7419) 2022-12-09 20:04:14 -06:00
hash Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
math Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
misc Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
network Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
path Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
platform Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
random Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
shells Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
strings Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
system Add "fall-through" signatures (#7527) 2022-12-22 00:33:26 +02:00
viewers table: Check stream timeout on every item (#7509) 2022-12-21 14:28:27 -08:00
default_context.rs Initial support for parse-time constants (#7436) 2022-12-22 00:21:03 +02:00
example_test.rs Reduced LOC by replacing several instances of Value::Int {}, Value::Float{}, Value::Bool {}, and Value::String {} with Value::int(), Value::float(), Value::boolean() and Value::string() (#7412) 2022-12-09 11:37:51 -05:00
input_handler.rs Add helper method to check whether ctrl+c was pressed, adopt it (#7482) 2022-12-15 09:39:24 -08:00
lib.rs Feature cleanup (#7182) 2022-11-22 16:58:11 -08:00
sort_utils.rs Fix sort-by, path join and size error arrows (#7199) 2022-11-23 19:22:23 +13:00