bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62595] Add ability to read .env files into make and


From: Paul D. Smith
Subject: [bug #62595] Add ability to read .env files into make and
Date: Thu, 9 Jun 2022 15:28:01 -0400 (EDT)

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

Right, so that's just a shell script that doesn't happen to do anything except
set variables.

Your comment 'The format of a .env file is simply "key=value"' is not the
case, as you yourself point out when you say "the single quotes surrounding
the value are to be ignored".

That means that the value needs to be parsed/interpreted somehow.  And if it's
really a shell script then the value could contain any valid shell syntax: it
might be quoted with single quotes, or double quotes, and the contents could
be escaped with "\" and how that is handled depends on the type of quoting. 
The value could contain a simple variable that needs to be expanded, or a
variable of the form ${...}.  It could use fancy shell variable syntax like
${foo:-bar} or any of the other things.

It could even contain backticks or $(....) to run subcommands and retrieve the
output.

This is what I meant by, I don't really want to put an entire shell parser
into make.

If there's some limit to the actual syntax of these ".env files", where
there's some standard specification that reduces their scope from "any valid
shell variable assignment" to something more tractable, can you point to such
a spec?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62595>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]