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 {
125
125
// clone the repo if we have not done so
126
126
if !repo_path. is_dir ( ) {
127
127
println ! ( "Cloning {} and checking out {}" , url, commit) ;
128
- Command :: new ( "git" )
128
+ if ! Command :: new ( "git" )
129
129
. arg ( "clone" )
130
130
. arg ( url)
131
131
. 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
+ }
134
138
}
135
139
// check out the commit/branch/whatever
136
- Command :: new ( "git" )
140
+ if ! Command :: new ( "git" )
137
141
. arg ( "checkout" )
138
142
. arg ( commit)
139
143
. 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
+ }
142
150
143
151
Crate {
144
152
version : commit. clone ( ) ,
You can’t perform that action at this time.
0 commit comments