Follow-up Comment #2, bug #62595 (project make):

Hi Paul

.env files are commonly used for specifying secrets for an application or a

Please see this question to get an idea of how people are currently trying to
use .env files in their Makefile:

The format of a .env file is simply "key=value". From the make.env project I
linked to, here is what a typical file may look like

ANOTHER_VAR='"hello world'


In the above case, the single quotes surrounding the value are to be ignored,
but everything else is to be taken literally. Some .env parsers take it a step
further and also expand environment variables within the .env file, so values
that are surrounded by double quotes and have $ symbol inside are expanded and
the result is what is stored as part of the value. ex. user="$USER" expands to

The solution I settled on for the make.env project is to convert each of those
lines to "export KEY:='$(value VALUE)'", then load them into make using the
--eval flag. This was the only way I found that reliably loads the value into
make without make attempting to interpret the value.

I hope that clears things up


Reply to this item at:


Message sent via Savannah

Reply via email to