Skip to content

Commit 0cd3846

Browse files
authored
set dotenv-path does not override set dotenv-filename (#2262)
1 parent 56eaa93 commit 0cd3846

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/dotenv.rs

+13
Original file line numberDiff line numberDiff line change
@@ -394,3 +394,16 @@ fn dotenv_path_usable_from_subdir() {
394394
.stdout("dotenv-value\n")
395395
.run();
396396
}
397+
398+
#[test]
399+
fn dotenv_path_does_not_override_dotenv_file() {
400+
Test::new()
401+
.write(".env", "KEY=ROOT")
402+
.write(
403+
"sub/justfile",
404+
"set dotenv-path := '.'\n@foo:\n echo ${KEY}",
405+
)
406+
.current_dir("sub")
407+
.stdout("ROOT\n")
408+
.run();
409+
}

0 commit comments

Comments
 (0)