Chromium Code Reviews| Index: utils/pub/git_source.dart |
| diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart |
| index cc08e39113482b6a606d53ac5747e51fa1df1762..86acc736367c842192eeff33cb166ff621983cc6 100644 |
| --- a/utils/pub/git_source.dart |
| +++ b/utils/pub/git_source.dart |
| @@ -22,9 +22,17 @@ class GitSource extends Source { |
| * Clones a Git repo to the local filesystem. |
| */ |
| Future<bool> install(PackageId id, String destPath) { |
| - return runProcess("git", ["clone", "--progress", id.description, destPath], |
| - pipeStdout: true, pipeStderr: true). |
| - transform((result) => result.success); |
| + return isGitInstalled.chain((installed) { |
| + if (installed) { |
| + return runProcess("git", ["clone", "--progress", id.description, destPath], |
|
nweiz
2012/05/23 00:46:26
Line length
Bob Nystrom
2012/05/23 16:32:33
Done.
|
| + pipeStdout: true, pipeStderr: true). |
| + transform((result) => result.success); |
| + } else { |
| + throw new Exception( |
| + "Cannot install '${id.name}' from Git (${id.description}).\n" |
| + "Please ensure Git is correctly installed."); |
| + } |
| + }); |
| } |
| /** |