Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index 778e52f373a0655c6c35699fe9e56a31b773184e..5ca7036357d05d77fa594638cfda2a0491f285b2 100644 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -448,11 +448,15 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem): |
splice_index = command.index('$matching_files') |
command[splice_index:splice_index + 1] = matching_file_list |
- # Use a discrete exit status code of 2 to indicate that a hook action |
- # failed. Users of this script may wish to treat hook action failures |
- # differently from VC failures. |
- return gclient_utils.SubprocessCall(command, cwd=self.root_dir(), |
- fail_status=2) |
+ try: |
+ gclient_utils.CheckCallAndFilterAndHeader( |
+ command, cwd=self.root_dir(), always=True) |
+ except gclient_utils.Error, e: |
+ # Use a discrete exit status code of 2 to indicate that a hook action |
+ # failed. Users of this script may wish to treat hook action failures |
+ # differently from VC failures. |
+ print >> sys.stderr, 'Error: %s' % str(e) |
+ sys.exit(2) |
def root_dir(self): |
return self.parent.root_dir() |