mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 08:20:25 +02:00
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:
@@ -77,6 +77,20 @@ fn env_shorthand_multi() {
|
||||
assert_eq!(actual.out, "barbaz");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn let_env_file_pwd_env_var_fails() {
|
||||
let actual = nu!(cwd: ".", r#"let-env FILE_PWD = 'foo'"#);
|
||||
|
||||
assert!(actual.err.contains("automatic_env_var_set_manually"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn load_env_file_pwd_env_var_fails() {
|
||||
let actual = nu!(cwd: ".", r#"load-env { FILE_PWD : 'foo' }"#);
|
||||
|
||||
assert!(actual.err.contains("automatic_env_var_set_manually"));
|
||||
}
|
||||
|
||||
// FIXME: for some reason Nu is attempting to execute foo in `let-env FOO = foo`
|
||||
#[ignore]
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user