Permalink
Browse files

Update loader.js

Node v0.10 no longer silently ignores non-string values, but throws an exception.
  • Loading branch information...
1 parent 06d70f9 commit 1b515c1fd36e2b5015eeaff33edc1c88a07b6865 @natecavanaugh committed Mar 22, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/cmds/loader.js
View
@@ -130,15 +130,16 @@ mods = {
scan: function() {
var self = this,
dirs = fs.readdirSync(this.start),
- metaFiles = [];
+ metaFiles = [],
+ base = self.base || '';
dirs.forEach(function(d) {
if (self.strict) {
- if (!util.exists(path.join(self.base, d, 'build.json'))) {
+ if (!util.exists(path.join(base, d, 'build.json'))) {
return; //No build.json file, exclude this automatically
}
}
- var p = path.join(self.base, d, 'meta'),
+ var p = path.join(base, d, 'meta'),
files;
if (util.exists(p)) {
files = fs.readdirSync(p);

0 comments on commit 1b515c1

Please sign in to comment.