nushell/crates/nu-command/src
WindSoilder 48b7b415e2
spanned error on path exists command (#7717)
# Description

Closes: #7696 

# User-Facing Changes

Before:
```
❯ 'temp/aa' | path exists
Error: nu:🐚:io_error (link)

  × I/O error
  help: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
```

After:
```
❯ 'temp/aa' | path exists
Error: nu:🐚:io_error (link)

  × I/O error
   ╭─[entry #42:1:1]
 1 │ 'temp/aa' | path exists
   · ────┬────
   ·     ╰── Permission denied (os error 13)
   ╰────
```
# 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.
2023-01-12 06:56:39 -06:00
..
bits Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
bytes Fix typos by codespell (#7600) 2022-12-26 02:31:26 -05:00
charting Fix typos by codespell (#7600) 2022-12-26 02:31:26 -05:00
conversions Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
core_commands Continue and Break on Try/Catch (#7683) 2023-01-05 21:41:51 +01:00
database Standardise the use of ShellError::UnsupportedInput and ShellError::TypeMismatch and add spans to every instance of the former (#7217) 2022-12-23 01:48:53 -05:00
dataframe let start open anything and everything (#7580) 2023-01-03 10:47:37 -08:00
date Add extra_usage messages for subcommand-only commands (#7594) 2022-12-24 07:16:29 -06:00
deprecated Remove math eval command (#7284) 2023-01-04 23:50:18 +01:00
env Fix an example of env command (#7603) 2022-12-26 16:40:34 +08:00
experimental Change instances of Value::string("foo", Span::test_data()) to Value::test_string("foo") (#7592) 2022-12-24 10:25:38 +01:00
filesystem Progress bar Implementation (#7661) 2023-01-10 20:57:48 -05:00
filters [Chore] cleanup in where implementation (#7679) 2023-01-04 22:50:02 +01:00
formats Support redirect err and out to different streams (#7685) 2023-01-12 10:22:30 +01:00
generators Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
hash Add extra_usage messages for subcommand-only commands (#7594) 2022-12-24 07:16:29 -06:00
math Remove math eval command (#7284) 2023-01-04 23:50:18 +01:00
misc Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
network Progress bar Implementation (#7661) 2023-01-10 20:57:48 -05:00
path spanned error on path exists command (#7717) 2023-01-12 06:56:39 -06:00
platform Fix typos by codespell (#7600) 2022-12-26 02:31:26 -05:00
random Add extra_usage messages for subcommand-only commands (#7594) 2022-12-24 07:16:29 -06:00
shells Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
strings Improve wording of str replace help messages (#7708) 2023-01-10 20:46:50 +01:00
system don't expand tilde if we quote external arguments (#7711) 2023-01-11 19:14:19 -05:00
viewers Fix generated doc for explore commands (#7723) 2023-01-11 11:17:12 +08:00
default_context.rs Url encode to escape special characters (#7664) 2023-01-05 19:24:38 +01:00
example_test.rs Make stream info visible to users in describe (#7589) 2023-01-03 21:08:05 -08:00
input_handler.rs Standardise the use of ShellError::UnsupportedInput and ShellError::TypeMismatch and add spans to every instance of the former (#7217) 2022-12-23 01:48:53 -05:00
lib.rs Progress bar Implementation (#7661) 2023-01-10 20:57:48 -05:00
progress_bar.rs Progress bar Implementation (#7661) 2023-01-10 20:57:48 -05:00
sort_utils.rs Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00