From 21ebfca368db3ed62b292c954d4d058ce28b02ff Mon Sep 17 00:00:00 2001 From: Sam Hedin Date: Tue, 23 Jun 2020 23:44:39 +0200 Subject: [PATCH] Delete accidentally added todo.org file --- crates/nu-cli/src/env/TODO.org | 35 ---------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 crates/nu-cli/src/env/TODO.org diff --git a/crates/nu-cli/src/env/TODO.org b/crates/nu-cli/src/env/TODO.org deleted file mode 100644 index 911020794a..0000000000 --- a/crates/nu-cli/src/env/TODO.org +++ /dev/null @@ -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 { - 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) \ No newline at end of file