Skip to content

Commit

Permalink
fix(cli): require at the correct directory
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemao committed Aug 24, 2015
1 parent 104b3aa commit feceb8b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var fs = require('fs');
var meow = require('meow');
var tempfile = require('tempfile');
var _ = require('lodash');
var join = require('path').join;

var cli = meow({
help: [
Expand Down Expand Up @@ -83,19 +84,19 @@ var outStream;

try {
if (flags.context) {
templateContext = require(flags.context);
templateContext = require(join(process.cwd(), flags.context));
}

if (flags.gitRawCommitsOpts) {
gitRawCommitsOpts = require(flags.gitRawCommitsOpts);
gitRawCommitsOpts = require(join(process.cwd(), flags.gitRawCommitsOpts));
}

if (flags.parserOpts) {
parserOpts = require(flags.parserOpts);
parserOpts = require(join(process.cwd(), flags.parserOpts));
}

if (flags.writerOpts) {
writerOpts = require(flags.writerOpts);
writerOpts = require(join(process.cwd(), flags.writerOpts));
}
} catch (err) {
console.error('Failed to get file. ' + err);
Expand Down

0 comments on commit feceb8b

Please sign in to comment.