mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Issue #985.
This commit is contained in:
parent
c16c90c00a
commit
83d424f2f4
2 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@
|
|||
base = path.join(source);
|
||||
compile = function(source, topLevel) {
|
||||
return path.exists(source, function(exists) {
|
||||
if (!exists) {
|
||||
if (topLevel && !exists) {
|
||||
throw new Error("File not found: " + source);
|
||||
}
|
||||
return fs.stat(source, function(err, stats) {
|
||||
|
|
|
@ -76,7 +76,7 @@ compileScripts = ->
|
|||
base = path.join(source)
|
||||
compile = (source, topLevel) ->
|
||||
path.exists source, (exists) ->
|
||||
throw new Error "File not found: #{source}" unless exists
|
||||
throw new Error "File not found: #{source}" if topLevel and not exists
|
||||
fs.stat source, (err, stats) ->
|
||||
if stats.isDirectory()
|
||||
fs.readdir source, (err, files) ->
|
||||
|
|
Loading…
Add table
Reference in a new issue