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)( return Promise.promisify(fs.writeFile, fs)(
path.join(config.directory, filename), path.join(config.directory, filename),
tmpl(config.variables || {}) 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 current = Promise.bind({failed: false, failedOn: 0});
var log = []; var log = [];
_.each(seeds, function(seed, i) { _.each(seeds, function(seed, i) {
var name = seed; var name = path.join(seedDirectory, name);
seed = require(path.join(workingDir, seedDirectory, name)); seed = require(path.join(workingDir, name));
// Run each seed file. // Run each seed file.
current = current.then(function() { current = current.then(function() {