Chromium Code Reviews| Index: utils/pub/git_source.dart |
| diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart |
| index 5d7e2d72e15fbd8a13793208f0a7403fe7b6c82c..f8fb7e3b09b25dfb21600ca242442b7bfcad7921 100644 |
| --- a/utils/pub/git_source.dart |
| +++ b/utils/pub/git_source.dart |
| @@ -150,9 +150,12 @@ class GitSource extends Source { |
| Future _clone(String from, String to, {bool mirror: false}) { |
| // TODO(rnystrom): For some mysterious reason, the Windows buildbots do not |
| // have the right working directory when pub spawns git, so the relative |
| - // path fails. To work around it, just always pass in a full path. Should |
| - // figure out what's going on here. |
| - from = getFullPath(from); |
| + // path fails. To work around it, if [from] looks like a relative path then |
| + // manually make it absolute here. Should figure out what's really going on. |
| + const URL_LIKE = const RegExp('[a-z]+\:'); |
|
nweiz
2012/11/09 22:28:12
You should really use an r-string here, and it sho
Bob Nystrom
2012/11/09 22:55:00
Done, thanks!
|
| + if (!URL_LIKE.hasMatch(from)) { |
| + from = getFullPath(from); |
| + } |
| // Git on Windows does not seem to automatically create the destination |
| // directory. |