Delete accidentally added todo.org file
This commit is contained in:
parent
c8a7116ec7
commit
21ebfca368
35
crates/nu-cli/src/env/TODO.org
vendored
35
crates/nu-cli/src/env/TODO.org
vendored
|
@ -1,35 +0,0 @@
|
|||
* TODO
|
||||
** Fixed: Run even if =env()= returns None
|
||||
It happens if there is no env-section in .config/nu/config.toml.
|
||||
This results in
|
||||
#+begin_src rust
|
||||
impl Env for Environment {
|
||||
fn env(&self) -> Option<Value> {
|
||||
if let Some(vars) = &self.environment_vars {
|
||||
return Some(vars.clone());
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
#+end_src
|
||||
returning =None=, which completely skips running the code for dealing with directory specific environment variables.
|
||||
** Confirm intended behavior
|
||||
- If you are in a directory, or a subdirectory to a directory with a .nu-file, the vars in that .nu-file are applied.
|
||||
- If you leave a directory which set some variables, the variables are unset.
|
||||
- If a directory contains a .nu with an environment variable that was already set, the old value will be overwritten.
|
||||
- This holds even if the old value was set by a .nu in a parent directory. The overwritten value is restored when you leave the directory.
|
||||
** Security
|
||||
https://github.com/nushell/nushell/issues/1965
|
||||
- Add trust subcommand
|
||||
- The trust subcommand should hash the current directory path and the content of its .nu-env.
|
||||
- If the directory path changes or the content of the .nu-env changes, show a warning.
|
||||
- Add distrust subcommand
|
||||
- Add command to clear allowed .nu-envs in a directory.
|
||||
** Nice errors
|
||||
** Potential issues
|
||||
There was previously functionality to track overwritten environment variables, which was used to restore any values that are overwritten.
|
||||
However, it seems that with the current version the already existing nushell functionality takes care of this, in every case I can come up with.
|
||||
Because of that, I just removed the code. It's still there, in the venerable git log if anything ever changes `acd3215b` `Remove overwritten values tracking, as it is not needed`.
|
||||
(I am making a note of this as I half expect someone to come up with a scenario which requires this to be re-added.)
|
||||
** mknuenv
|
||||
mknuenv(key=val, key=val)
|
Loading…
Reference in New Issue
Block a user