build: nicer error msg when git ls-files fails
authorAndrew Tridgell <tridge@samba.org>
Sun, 4 Apr 2010 00:23:43 +0000 (10:23 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:25 +0000 (20:27 +1000)
buildtools/wafsamba/samba_dist.py

index 87ea8ccbefe905e154bc159fcbdcc4a43446348a..eacc7c05342d03eca54ed3cd48b41d75d4234226 100644 (file)
@@ -45,7 +45,11 @@ def dist():
             destdir = '.'
         absdir = os.path.join(srcdir, dir)
         git_cmd = [ env.GIT, 'ls-files', '--full-name', absdir ]
-        files = Utils.cmd_output(git_cmd).split()
+        try:
+            files = Utils.cmd_output(git_cmd).split()
+        except:
+            print('git command failed: %s' % ' '.join(git_cmd))
+            sys.exit(1)
         for f in files:
             abspath = os.path.join(srcdir, f)
             if dir != '.':