Skip to content
Browse files

Fix runtime error with cake clean if the output files do not exist yet.

  • Loading branch information...
1 parent a477dae commit c1e883fa3d6d7956206fbb9d1b836f11573d5a96 @brandonramirez brandonramirez committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 Cakefile
View
7 Cakefile
@@ -6,8 +6,11 @@ task 'build', 'compile source files to javascript', (options) ->
compile 'bin/buildr.coffee', true
task 'clean', 'delete compiled output', (options) ->
- fs.unlink 'lib/buildr.js'
- fs.unlink 'bin/buildr.js'
+ fs.exists 'lib/buildr.js', (exists) ->
+ fs.unlink 'lib/buildr.js' if exists
+
+ fs.exists 'bin/buildr.js', (exists) ->
+ fs.unlink 'bin/buildr.js' if exists
compile = (sourceFile, needShebang) ->
fs.readFile sourceFile, 'utf8', (error, coffeeCode) ->

0 comments on commit c1e883f

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