Move from source to source-env (#6277)

* start working on source-env

* WIP

* Get most tests working, still one to go

* Fix file-relative paths; Report parser error

* Fix merge conflicts; Restore source as deprecated

* Tests: Use source-env; Remove redundant tests

* Fmt

* Respect hidden env vars

* Fix file-relative eval for source-env

* Add file-relative eval to "overlay use"

* Use FILE_PWD only in source-env and "overlay use"

* Ignore new tests for now

This will be another issue

* Throw an error if setting FILE_PWD manually

* Fix source-related test failures

* Fix nu-check to respect FILE_PWD

* Fix corrupted spans in source-env shell errors

* Fix up some references to old source

* Remove deprecation message

* Re-introduce deleted tests

Co-authored-by: kubouch <kubouch@gmail.com>
This commit is contained in:
JT
2022-09-01 08:32:56 +12:00
committed by GitHub
parent 11531b7630
commit c52d45cb97
33 changed files with 726 additions and 175 deletions

View File

@ -367,7 +367,7 @@ fn env_change_block_condition_pwd() {
&env_change_hook_code_condition(
"PWD",
r#"{|before, after| ($after | path basename) == samples }"#,
r#"'source .nu-env'"#,
r#"'source-env .nu-env'"#,
),
"cd samples",
"$env.SPAM",