nushell/crates/nu-command/src/env
David Matos ccd72fa64a
Error out when config.nu has no editor configured (#8282)
# Description
Fixes #8245. Instead of trying to use `nano` or `notepad` as defaults,
it errors out if finds that `buffer_editor` , $EDITOR, $VISUAL do not
exist.

If the PR is landed, Ill update the website as it means what its in
there is no longer correct.
```
❯ config nu
Error: 
  × No editor configured
   ╭─[entry #3:1:1]
 1 │ config nu
   · ────┬────
   ·     ╰── Please specify one via environment variables $EDITOR or $VISUAL
   ╰────
  help: Nushell's config file can be found with the command: $nu.config-path. For more help: (https://nushell.sh/book/configuration.html#configurations-with-built-in-commands)
  
  ``` 
# User-Facing Changes

# Tests + Formatting


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

- [X]  `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes)
- [X] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style
- [X] `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-03-09 08:07:20 -06:00
..
config Error out when config.nu has no editor configured (#8282) 2023-03-09 08:07:20 -06:00
export_env.rs Use imported names in Command::run signatures (#7967) 2023-02-05 22:17:46 +01:00
let_env.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
load_env.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00
mod.rs Remove the 'env' command, as we have the variable (#8185) 2023-03-01 21:20:00 +13:00
source_env.rs ensure that when nu evaluates files, it allows early returns (#7415) 2023-02-02 00:02:27 +01:00
with_env.rs Document and critically review ShellError variants - Ep. 3 (#8340) 2023-03-06 18:33:09 +01:00