Skip to content

Commit

Permalink
Merge pull request #509 from sunnylqm/patch-1
Browse files Browse the repository at this point in the history
Fix wrong output file option in cli
  • Loading branch information
mde committed Apr 21, 2020
2 parents 685f5ef + e527cd2 commit bdbdff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ function run() {

let template = fs.readFileSync(templatePath).toString();
let output = ejs.render(template, vals, opts);
if (pOpts.outputFile) {
fs.writeFileSync(pOpts.outputFile, output);
if (pOpts['output-file']) {
fs.writeFileSync(pOpts['output-file'], output);
}
else {
process.stdout.write(output);
Expand Down

0 comments on commit bdbdff4

Please sign in to comment.