File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,17 @@ fn install_source(c: cargo, path: str) {
194
194
}
195
195
}
196
196
197
+ fn install_git ( c : cargo , _path : str ) {
198
+ let wd = tempfile:: mkdtemp ( c. workdir + fs:: path_sep ( ) , "" ) ;
199
+ alt wd {
200
+ some( p) {
201
+ run:: run_program ( "git" , [ "clone" , _path, p] ) ;
202
+ install_source ( c, p) ;
203
+ }
204
+ _ { fail "needed temp dir" ; }
205
+ }
206
+ }
207
+
197
208
fn install_file ( c : cargo , _path : str ) {
198
209
let wd = tempfile:: mkdtemp ( c. workdir + fs:: path_sep ( ) , "" ) ;
199
210
alt wd {
@@ -213,6 +224,9 @@ fn cmd_install(c: cargo, argv: [str]) {
213
224
ret;
214
225
}
215
226
227
+ if str:: starts_with ( argv[ 2 ] , "git:" ) {
228
+ install_git ( c, argv[ 2 ] ) ;
229
+ }
216
230
if str:: starts_with ( argv[ 2 ] , "file:" ) {
217
231
let path = rest ( argv[ 2 ] , 5 u) ;
218
232
install_file ( c, path) ;
You can’t perform that action at this time.
0 commit comments