Skip to content

Commit

Permalink
Fixed template option no working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phara0h committed Feb 17, 2021
1 parent 2cbb4b2 commit 1a51f00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -8,7 +8,7 @@ function commaSeparatedList(value, dummyPrevious) {

async function start() {
const {NBars} = await import("nbars");
program.option('-t, --template', 'Readme.nbs file (defaults to current dir, then to no template)')
program.option('-t, --template <path>', 'Readme.nbs file (defaults to current dir, then to no template)')
.option('-o, --out <type>', 'Where to output Readme.md file (defaults to current dir/README.md)', 'README.md')
.requiredOption('-i, --input <items>', 'comma separated list of md file paths to be merged in order', commaSeparatedList);

Expand All @@ -32,10 +32,10 @@ async function start() {
}
} else {
try {
program.template = await fs.readFile('Readme.nbs', {encoding: 'ascii'});
program.template = await fs.readFile(program.template, {encoding: 'ascii'});
template = NBars.compile(program.template);
} catch (e) {
console.log('Error reading file '+program.template);
console.log('Error reading file '+program.template,e);
process.exit();
}
}
Expand Down

0 comments on commit 1a51f00

Please sign in to comment.