| Index: utils/pub/git_source.dart
|
| diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
|
| index e0737e8e02c795679683f21e30f165a3ea8e4581..ca3bb712ef1af6a566a59ff19707c29036b27040 100644
|
| --- a/utils/pub/git_source.dart
|
| +++ b/utils/pub/git_source.dart
|
| @@ -153,9 +153,13 @@ class GitSource extends Source {
|
| * remote repository. See the manpage for `git clone` for more information.
|
| */
|
| Future _clone(String from, String to, [bool mirror=false]) {
|
| - var args = ["clone", from, to];
|
| - if (mirror) args.insertRange(1, 1, "--mirror");
|
| - return runGit(args).transform((result) {
|
| + // Git on Windows does not seem to automatically create the destination
|
| + // directory.
|
| + return ensureDir(to).chain((_) {
|
| + var args = ["clone", from, to];
|
| + if (mirror) args.insertRange(1, 1, "--mirror");
|
| + return runGit(args);
|
| + }).transform((result) {
|
| if (!result.success) throw 'Git failed.';
|
| return null;
|
| });
|
|
|