Skip to content

Commit

Permalink
set dotenv-path does not override set dotenv-filename (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Jul 18, 2024
1 parent 56eaa93 commit 0cd3846
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/dotenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,16 @@ fn dotenv_path_usable_from_subdir() {
.stdout("dotenv-value\n")
.run();
}

#[test]
fn dotenv_path_does_not_override_dotenv_file() {
Test::new()
.write(".env", "KEY=ROOT")
.write(
"sub/justfile",
"set dotenv-path := '.'\n@foo:\n echo ${KEY}",
)
.current_dir("sub")
.stdout("ROOT\n")
.run();
}

0 comments on commit 0cd3846

Please sign in to comment.