nushell/crates/nu-cli/src/env
Sam Hedin f3f40df4dd
Tests for autoenv (and fixes for bugs the tests found) (#2148)
* add test basic_autoenv_vars_are_added

* Tests

* Entry and exit scripts

* Recursive set and overwrite

* Make sure that overwritten vals are restored

* Move tests to autoenv

* Move tests out of cli crate

* Tests help, apparently. Windows has issues

On windows, .nu-env is not applied immediately after running autoenv trust.
You have to cd out of the directory for it to work.

* Sort paths non-lexicographically

* Sibling dir test

* Revert "Sort paths non-lexicographically"

This reverts commit 72e4b856af.

* Rename test

* Change conditions

* Revert "Revert "Sort paths non-lexicographically""

This reverts commit 71606bc62f.

* Set vars as they are discovered

This means that if a parent directory is untrusted,
the variables in its child directories are still set properly.

* format

* Fix cleanup issues too

* Run commands in their separate functions

* Make everything into one large function like all the cool kids

* Refactoring

* fmt

* Debugging windows path issue

* Canonicalize

* Trim whitespace

* On windows, use echo nul instead of touch to create file in test

* Avoid cloning by using drain()
2020-07-12 16:14:09 +12:00
..
directory_specific_environment.rs Tests for autoenv (and fixes for bugs the tests found) (#2148) 2020-07-12 16:14:09 +12:00
environment_syncer.rs Autoenv rewrite, security and scripting (#2083) 2020-07-06 05:34:00 +12:00
environment.rs Tests for autoenv (and fixes for bugs the tests found) (#2148) 2020-07-12 16:14:09 +12:00
host.rs Bump deps and touchup (#2066) 2020-06-27 19:54:31 +12:00