@@ -116,6 +116,8 @@ fn installed_with_brew(package: &str) -> bool {
116
116
}
117
117
118
118
fn brew_reinstall ( package : & ' static str ) -> Result < ( ) , Error > {
119
+ log:: info!( "Installing `{}` with brew..." , package) ;
120
+
119
121
// reinstall works even if it's not installed yet, and will upgrade
120
122
// if it's already installed!
121
123
duct:: cmd ( "brew" , [ "reinstall" , package] )
@@ -129,6 +131,7 @@ fn update_package(package: &'static str, gem_cache: &mut GemCache) -> Result<(),
129
131
if installed_with_brew ( package) {
130
132
brew_reinstall ( package) ?;
131
133
} else {
134
+ log:: info!( "Installing `{}` with gem..." , package) ;
132
135
gem_cache. reinstall ( package) ?;
133
136
}
134
137
Ok ( ( ) )
@@ -175,13 +178,14 @@ impl PackageSpec {
175
178
package : self . pkg_name ,
176
179
source,
177
180
} ) ?;
178
- log:: info!( "package `{}` present: {}" , self . pkg_name, found) ;
181
+ if !found {
182
+ log:: info!( "package `{}` not found" , self . pkg_name) ;
183
+ }
179
184
Ok ( found)
180
185
}
181
186
182
187
pub fn install ( & self , reinstall_deps : bool , gem_cache : & mut GemCache ) -> Result < bool , Error > {
183
188
if !self . found ( ) ? || reinstall_deps {
184
- println ! ( "Installing `{}`..." , self . pkg_name) ;
185
189
match self . package_source {
186
190
PackageSource :: Brew => brew_reinstall ( self . pkg_name ) ?,
187
191
PackageSource :: BrewOrGem => update_package ( self . pkg_name , gem_cache) ?,
@@ -207,23 +211,30 @@ pub fn install_all(
207
211
IOS_DEPLOY_PACKAGE . install ( reinstall_deps, & mut gem_cache) ?;
208
212
}
209
213
gem_cache. initialize ( ) ?;
210
- let outdated = Outdated :: load ( & mut gem_cache) ?;
211
- outdated. print_notice ( ) ;
212
- if !outdated. is_empty ( ) && !non_interactive {
213
- let answer = loop {
214
- if let Some ( answer) = prompt:: yes_no (
215
- "Would you like these outdated dependencies to be updated for you?" ,
216
- Some ( true ) ,
217
- ) ? {
218
- break answer;
219
- }
220
- } ;
221
- if answer {
222
- for package in outdated. iter ( ) {
223
- update_package ( package, & mut gem_cache) ?;
214
+ match Outdated :: load ( & mut gem_cache) {
215
+ Ok ( outdated) => {
216
+ outdated. print_notice ( ) ;
217
+ if !outdated. is_empty ( ) && !non_interactive {
218
+ let answer = loop {
219
+ if let Some ( answer) = prompt:: yes_no (
220
+ "Would you like these outdated dependencies to be updated for you?" ,
221
+ Some ( true ) ,
222
+ ) ? {
223
+ break answer;
224
+ }
225
+ } ;
226
+ if answer {
227
+ for package in outdated. iter ( ) {
228
+ update_package ( package, & mut gem_cache) ?;
229
+ }
230
+ }
224
231
}
225
232
}
233
+ Err ( e) => {
234
+ log:: warn!( "Failed to check for outdated dependencies: {}" , e) ;
235
+ }
226
236
}
237
+
227
238
// we definitely don't want to install this on CI...
228
239
if !skip_dev_tools {
229
240
let tool_info = DeveloperTools :: new ( ) ?;
0 commit comments