CLI outputs relative path of files, not just filename

This commit is contained in:
Noah Santorello 2014-07-21 09:51:04 -04:00
parent f8d01e9901
commit 65cb342e09

View File

@ -106,7 +106,7 @@ Seeder.prototype._writeNewSeed = function(name) {
return Promise.promisify(fs.writeFile, fs)(
path.join(config.directory, filename),
tmpl(config.variables || {})
).return(filename);
).return(path.join(this.config.directory, filename));
};
};
@ -119,8 +119,8 @@ Seeder.prototype._waterfallBatch = function(seeds) {
var current = Promise.bind({failed: false, failedOn: 0});
var log = [];
_.each(seeds, function(seed, i) {
var name = seed;
seed = require(path.join(workingDir, seedDirectory, name));
var name = path.join(seedDirectory, name);
seed = require(path.join(workingDir, name));
// Run each seed file.
current = current.then(function() {