summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-02-05 20:08:29 (GMT)
committerSteven Knight <knight@baldmt.com>2002-02-05 20:08:29 (GMT)
commitf6c20c8f66928d7d9845717cca12770dbfc86a59 (patch)
tree279913aaaa33e5ec28f3699a4a3c894336f56e87 /src/engine/SCons/Script
parentac9aa00b71169ab6d275ee6990248e1778bcf456 (diff)
downloadSCons-f6c20c8f66928d7d9845717cca12770dbfc86a59.zip
SCons-f6c20c8f66928d7d9845717cca12770dbfc86a59.tar.gz
SCons-f6c20c8f66928d7d9845717cca12770dbfc86a59.tar.bz2
Make scons return a failure code when a Builder fails (Anthony Roach)
Diffstat (limited to 'src/engine/SCons/Script')
-rw-r--r--src/engine/SCons/Script/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index 93ba795..2b907a0 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -90,13 +90,15 @@ class BuildTask(SCons.Taskmaster.Task):
print SCons.Util.render_tree(self.targets[0], get_children)
def failed(self):
- global ignore_errors
+ global exit_status
if ignore_errors:
SCons.Taskmaster.Task.executed(self)
elif keep_going_on_error:
SCons.Taskmaster.Task.fail_continue(self)
+ exit_status = 2
else:
SCons.Taskmaster.Task.fail_stop(self)
+ exit_status = 2
class CleanTask(SCons.Taskmaster.Task):
"""An SCons clean task."""
@@ -123,6 +125,7 @@ ignore_errors = 0
keep_going_on_error = 0
help_option = None
print_tree = 0
+exit_status = 0 # exit status, assume success by default
# utility functions
@@ -710,4 +713,4 @@ def main():
except:
_scons_other_errors()
-
+ sys.exit(exit_status)