diff --git a/src/seeder.js b/src/seeder.js index 348a6b5c..071b060a 100644 --- a/src/seeder.js +++ b/src/seeder.js @@ -127,17 +127,15 @@ function getSeedsAtLocation(location) { * Locates seeds given a set of files to scrape * @param {string[]} sources The filenames to scrape for seeds */ -function locateSeeds(sources, cwd) { +function locateSeeds(sources) { sources = sources || []; - cwd = cwd || process.cwd(); - const locations = sources.map((source) => path.join(cwd, source)); - return BbPromise.map(locations, (location) => { - return fileExists(location).then((exists) => { + return BbPromise.map(sources, (source) => { + return fileExists(source).then((exists) => { if(!exists) { - throw new Error("source file " + location + " does not exist"); + throw new Error("source file " + source + " does not exist"); } - return getSeedsAtLocation(location); + return getSeedsAtLocation(source); }); // Smash the arrays together }).then((seedArrays) => [].concat.apply([], seedArrays));