Closed dsbw closed 5 years ago
I'm sure I must be missing something somewhere, but I discovered the following using a new app, using environ and lein-environ 1.1.0. With the following profiles.clj:
{:dev {:env {:somevar "dev" :somevar2 "dev3"}} :test {:env {:somevar "test"}}}
When I "lein run", .lein-env is:
{:somevar "dev", :somevar2 "dev3"}
When I "lein test", .lein-env is:
{:somevar "test", :somevar2 "dev3"}
But I don't see where in the docs (or in the code for that matter :-() dev gets merged into test. I can't unset a dev-set variable, either, like:
{:dev {:env {:somevar "dev" :somevar2 "dev3"}} :test {:env {:somevar "test" :somevar2 nil}}}
I'm chasing down a more complex setup but this definitely threw me for a loop!
What you're seeing is how Leiningen's profiles work. See the Leiningen documentation on profiles for more information.
Thanks! I figured I was just looking in the wrong place.
I'm sure I must be missing something somewhere, but I discovered the following using a new app, using environ and lein-environ 1.1.0. With the following profiles.clj:
When I "lein run", .lein-env is:
{:somevar "dev", :somevar2 "dev3"}
When I "lein test", .lein-env is:
{:somevar "test", :somevar2 "dev3"}
But I don't see where in the docs (or in the code for that matter :-() dev gets merged into test. I can't unset a dev-set variable, either, like:
I'm chasing down a more complex setup but this definitely threw me for a loop!