Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Little logger fix

  • Loading branch information...
commit 64f602f04459a1253bcf3df7e2a1d4d078db5d0e 1 parent dbb6742
Vladimir Tsvang authored January 23, 2013

Showing 1 changed file with 14 additions and 2 deletions. Show diff stats Hide diff stats

  1. 16  lib/package.coffee
16  lib/package.coffee
@@ -211,15 +211,27 @@ class Package
211 211
       # handle errors
212 212
       return callback.call( @, err ) if err?
213 213
 
  214
+      # list of updated packages
  215
+      updated = []
  216
+
214 217
       # save changes
215 218
       for own pkg, idx in packages
216 219
         if pkg in dependencies
  220
+          # track update
  221
+          updated.push( pkg ) if @dependencies[ pkg ] isnt results[ idx ]
  222
+
217 223
           @dependencies[ pkg ] = results[ idx ]
218 224
         else if pkg in devDependencies
  225
+          # track update
  226
+          updated.push( pkg ) if @devDependencies[ pkg ] isnt results[ idx ]
  227
+
219 228
           @devDependencies[ pkg ] = results[ idx ]
220 229
 
221  
-      @log "Updated #{ packages.length } package(s)".cyan
222  
-      @log "  #{ ( "#{ pkgName }@#{ results[ idx ] }" for own pkgName, idx in packages ).join( "\n  " ).green }"
  230
+      if updated.length
  231
+        @log "Updated #{ updated.length } package(s)".cyan
  232
+        @log "  #{ ( "#{ pkgName }@#{ results[ idx ] }" for own pkgName, idx in updated ).join( "\n  " ).green }"
  233
+      else
  234
+        @log "Already up-to-date.".green
223 235
 
224 236
       # successful callback
225 237
       callback.call @

0 notes on commit 64f602f

Please sign in to comment.
Something went wrong with that request. Please try again.