summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Environment.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-08-26 12:55:22 (GMT)
committerSteven Knight <knight@baldmt.com>2008-08-26 12:55:22 (GMT)
commit0307a78b041c16b5e9ad60c19f669e856f32f49f (patch)
treeca4759db03d83fd713566e90877b104e9d8d590c /src/engine/SCons/Environment.py
parent5e7a97bda2ba7f206c231a28276a237b030da386 (diff)
downloadSCons-0307a78b041c16b5e9ad60c19f669e856f32f49f.zip
SCons-0307a78b041c16b5e9ad60c19f669e856f32f49f.tar.gz
SCons-0307a78b041c16b5e9ad60c19f669e856f32f49f.tar.bz2
Issue 2099: have Execute() print an error message if an action
fails. Better document the behavior of returning the exit status, and that exit-on-failure is the SConscript writer's responsibility.
Diffstat (limited to 'src/engine/SCons/Environment.py')
-rw-r--r--src/engine/SCons/Environment.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index f972550..db69d62 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -1813,6 +1813,11 @@ class Base(SubstitutionEnvironment):
action = apply(self.Action, (action,) + args, kw)
result = action([], [], self)
if isinstance(result, SCons.Errors.BuildError):
+ errstr = result.errstr
+ if result.filename:
+ errstr = result.filename + ': ' + errstr
+ import sys
+ sys.stderr.write("scons: *** %s\n" % errstr)
return result.status
else:
return result