weavejester / environ

Library for managing environment variables in Clojure
924 stars 71 forks source link

FileNotFoundException thrown when .lein-env file is not found #73

Open uris77 opened 7 years ago

uris77 commented 7 years ago

We have a project where we use environ and in dev we have a profiles.clj, but when building we providing everything via system environment vars. When building the project in Jenkins, we get a FileNotFoundException when it tries to read the .lein-env file, which just stops the entire build and never gets an opportunity to even read the system vars. Is it possible to add a try-catch block to read-env to handle these Exceptions?

weavejester commented 7 years ago

Could you explain your setup and the exception you get in a little more detail? Environ only tries to load the .lein-env file if that file exists. If it doesn't exist, it doesn't load it.