[Scons-users] Prevent users from shooting them in the foot when adding FLAGS

Bill Deegan bill at baddogconsulting.com
Wed Nov 15 10:16:21 EST 2017


Dan,

That must've been fun to find.. ;)
Pull requests welcome.
Though I'm reworking the storage/evaluation of environment variables
currently which I plan to get into the 3.1 or 4.0 release (Next feature
release, naming depends on whether I need to break compatibility with
3.0.1..)

-Bill

On Wed, Nov 15, 2017 at 7:15 AM, Dan Čermák <dan.cermak at cgc-instruments.com>
wrote:

> Hi folks,
>
> I have today successfully shoot myself in the foot with SCons by
> effectively doing the following:
>
> env.Append(CPPPATH=['/path/to/foo/bar\n'])
>
> The issue with this is that any build command gets terminated by the \n
> prematurely, e.g. a gcc -I/path/to/foo/bar\n -c foo.c gets executed as:
> gcc -I/path/to/foo/bar
> which obviously fails, as gcc lacks any source files.
>
> This is of course a user error (in my case it was because I extracted
> the CPPPATH from the invocation of an external program), however would
> anything speak against printing a warning if a \n or \r\n appears in any
> of the variables passed to the Environment?
>
>
> Cheers,
>
> Dan
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171115/97e9017a/attachment.html>


More information about the Scons-users mailing list