| Index: utils/pub/git_source.dart
|
| diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
|
| index cc08e39113482b6a606d53ac5747e51fa1df1762..f2cfa025ed3022f5df89b9a3a84bb335a344baf5 100644
|
| --- a/utils/pub/git_source.dart
|
| +++ b/utils/pub/git_source.dart
|
| @@ -22,9 +22,18 @@ 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],
|
| + 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.");
|
| + }
|
| + });
|
| }
|
|
|
| /**
|
|
|