| Index: gclient_scm.py
|
| diff --git a/gclient_scm.py b/gclient_scm.py
|
| index 6986bb7eb4bbdea5282e529427cf6925e669dc8d..93f69974b83db0e4a10c0e9340c5ca2e4679734d 100644
|
| --- a/gclient_scm.py
|
| +++ b/gclient_scm.py
|
| @@ -286,8 +286,13 @@ class GitWrapper(SCMWrapper, scm.GIT):
|
| cwd = self.checkout_path
|
| cmd = [self.COMMAND]
|
| cmd.extend(args)
|
| - sp = subprocess.Popen(cmd, cwd=cwd, stdout=stdout)
|
| - output = sp.communicate()[0]
|
| + logging.debug(cmd)
|
| + try:
|
| + sp = subprocess.Popen(cmd, cwd=cwd, stdout=stdout)
|
| + output = sp.communicate()[0]
|
| + except OSError:
|
| + raise gclient_utils.Error("git command '%s' failed to run." %
|
| + ' '.join(cmd) + "\nCheck that you have git installed.")
|
| if checkrc and sp.returncode:
|
| raise gclient_utils.Error('git command %s returned %d' %
|
| (args[0], sp.returncode))
|
|
|