-
Notifications
You must be signed in to change notification settings - Fork 426
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using dotenv.enable = true;
in devenv.nix
, variables that have substitutions are parsed literally without any expansion.
To reproduce
- Run
devenv init
in an empty directory - Add
dotenv.enable = true;
indevenv.nix
- Create an
.env
file like so:
A=0
B=1
C=$A+$B
The C=$A+$B
line is interchangable with C=${A}+${B}
.
4. Enter the development shell, either via devenv shell
or automatically if nix-direnv
is present
5. Run echo $C
. It should output 0+1
, but it outputs $A+$B
instead
Additional context:
- I am not sure if this is intentional or not (as some parsers are deliberately made simple), but considering that in other tools I used (Docker, Docker Compose, Rust's
sqlx
anddotenvy
) they are expanded, I figured it's worth reporting about this behaviour. - If this is intentional, please treat this as a feature request instead; Maybe a boolean like
dotenv.expand
as an option.
Version
devenv 1.9.0 (x86_64-linux)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working