File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -125,20 +125,28 @@ impl CrateSource {
125125 // clone the repo if we have not done so
126126 if !repo_path. is_dir ( ) {
127127 println ! ( "Cloning {} and checking out {}" , url, commit) ;
128- Command :: new ( "git" )
128+ if ! Command :: new ( "git" )
129129 . arg ( "clone" )
130130 . arg ( url)
131131 . arg ( & repo_path)
132- . output ( )
133- . expect ( "Failed to clone git repo!" ) ;
132+ . status ( )
133+ . expect ( "Failed to clone git repo!" )
134+ . success ( )
135+ {
136+ eprintln ! ( "Failed to clone {} into {}" , url, repo_path. display( ) )
137+ }
134138 }
135139 // check out the commit/branch/whatever
136- Command :: new ( "git" )
140+ if ! Command :: new ( "git" )
137141 . arg ( "checkout" )
138142 . arg ( commit)
139143 . current_dir ( & repo_path)
140- . output ( )
141- . expect ( "Failed to check out commit" ) ;
144+ . status ( )
145+ . expect ( "Failed to check out commit" )
146+ . success ( )
147+ {
148+ eprintln ! ( "Failed to checkout {} of repo at {}" , commit, repo_path. display( ) )
149+ }
142150
143151 Crate {
144152 version : commit. clone ( ) ,
You can’t perform that action at this time.
0 commit comments