bug-make
[Top][All Lists]
Advanced

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

[bug #56449] job.c (construct_command_argv_internal): Must use shell if


From: Eli Zaretskii
Subject: [bug #56449] job.c (construct_command_argv_internal): Must use shell if '%' character is present in recipe line
Date: Wed, 28 Aug 2019 15:06:48 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #4, bug #56449 (project make):

It is true that %Path% on a command line should expand to the value of Path in
the environment.  It is also true that to have this expansion, we need to
invoke the command through the shell.  However, this is only true for any
arbitrary %FOO% where an environment variable FOO is defined.  If FOO is not
defined, then %FOO% is expanded to just %FOO%, i.e. is not changed at all.  In
particular, %% is left alone by the shell.

So to support %FOO% expansion correctly, we need to figure out whether FOO is
defined or not.  IOW, we need to call 'getenv', at least.  And even that might
not be 100% accurate, since the command could modify the environment as part
of itself (but maybe we should ignore this possibility, even if it exists).


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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