Browse files

@filesToClean was never getting cleared out, so repeated calls to Bui…

…ldr.process failed in cleanOutPath because the same filenames would be listed multiple times.
  • Loading branch information...
1 parent b9e1d95 commit 8e22bda067adac4f9c662ea7177c27fdb5798a4b @brandonramirez brandonramirez committed Oct 28, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/
4 lib/
@@ -669,7 +669,9 @@ class Buildr
log 'debug', 'Cleaning outPath'
# Delete files to clean
- for fileFullPath in @filesToClean
+ while @filesToClean.length > 0
+ # Be sure to clean up the array as we go through it because this object gets reused in watch mode.
+ fileFullPath = @filesToClean.shift()
log 'debug', "Cleaning #{fileFullPath}"
fs.unlink fileFullPath, tasks.completer()

0 comments on commit 8e22bda

Please sign in to comment.