[Scons-users] env.command fails on mingw shell

Gary Oberbrunner garyo at oberbrunner.com
Thu Oct 25 18:51:00 EDT 2012


Probably need to set env[SPAWN] in that case.
On Oct 25, 2012 6:29 PM, "Evan Driscoll" <driscoll at cs.wisc.edu> wrote:


> On 10/25/2012 05:20 PM, Kraus Philipp wrote:

> > I posted the last 3 answer in one

> >

> > I run this Scons code

> >

> > import os

> > env = Environment(ENV = {'PATH' : os.environ["PATH"]})

> > env.Command("test", "", "ls;") # ls; and ls ; are the same

> >

> > and get

> >

> > Administrator at win7mingw /c/Users/Administrator/Documents

> > $ scons

> > scons: Reading SConscript files ...

> > scons: done reading SConscript files.

> > scons: Building targets ...

> > ls;

> > ls: ;: No such file or directory

> > scons: *** [test] Error 2

> > scons: building terminated because of errors.

>

> Bmitry Mikhin already explained that: scons is executing "ls;" through

> cmd.exe, because that's the value of env["SHELL"]. (Note: not

> os.environ["SHELL"]).

>

>

> Theoretically you could get it to use the MinGW shell by setting

> env["SHELL"] = env.WhereIs("bash")

> or whatever, but this won't actually work: SCons will try to run

> bash /C ls

> instead of

> bash -c ls

> because /C is what cmd uses. I'm not sure how to fix this -- any

> suggestions?

>

>

> Evan

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121025/7273ce78/attachment.html>


More information about the Scons-users mailing list