Skip to content

Commit

Permalink
Merge pull request #1527 from breckinloggins/fix_1446
Browse files Browse the repository at this point in the history
Fix for issue #1446: Compiler fails with unrelated exception on file permissions problems
  • Loading branch information
jashkenas committed Jul 18, 2011
2 parents 37019da + 2d54fea commit 860c503
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/command.coffee
Expand Up @@ -93,12 +93,14 @@ compileScripts = ->
throw err if err
if stats.isDirectory()
fs.readdir source, (err, files) ->
throw err if err
unprocessed[sourceIndex] += files.length
for file in files
compile path.join(source, file), sourceIndex
unprocessed[sourceIndex] -= 1
else if topLevel or path.extname(source) is '.coffee'
fs.readFile source, (err, code) ->
throw err if err
unprocessed[sourceIndex] -= 1
if opts.join
contents[sourceIndex] = helpers.compact([contents[sourceIndex], code.toString()]).join('\n')
Expand Down

0 comments on commit 860c503

Please sign in to comment.