Permalink
Browse files

fix a bug which prevented running on a single file

Make sure that sourceFiles is an array, even if there is only one
source file
  • Loading branch information...
1 parent d6414c5 commit a35bd4a30e022942d4e8642abd63d3267f079cfa @fairfieldt committed Mar 6, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 coffeescript-concat.coffee
@@ -223,7 +223,7 @@ alias('o', 'output-file')
argv = options.argv
includeDirectories = argv.I or []
-sourceFiles = argv._
+sourceFiles = if typeof argv._ is 'string' then [argv._] else argv._
if argv.help || (includeDirectories.length==0 && sourceFiles.length==0) then options.showHelp()
-concatenate(sourceFiles, includeDirectories, argv.o)
+concatenate(sourceFiles, includeDirectories, argv.o)

0 comments on commit a35bd4a

Please sign in to comment.