From 3ed6d7e76f9e2936e2d27ceeee8984950ea900a3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Apr 2010 10:23:43 +1000 Subject: build: nicer error msg when git ls-files fails --- buildtools/wafsamba/samba_dist.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py index 87ea8ccbef..eacc7c0534 100644 --- a/buildtools/wafsamba/samba_dist.py +++ b/buildtools/wafsamba/samba_dist.py @@ -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 != '.': -- cgit