Skip to content

Commit

Permalink
fix: version commands read package.json from wrong dir
Browse files Browse the repository at this point in the history
  • Loading branch information
paibamboo committed Jun 17, 2019
1 parent 8898736 commit 0ed5a58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const inquirer = require('./lib/inquirer');
const git = require('./lib/git');
const github = require('./lib/github');
const program = require('commander');

program.version(JSON.parse(fs.readFileSync('./package.json'))['version'] || 'test-mode', '-v, --version');
program.version(
JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json')))['version'] || 'test-mode', '-v, --version'
);

program
.command('finish-feature')
Expand Down

0 comments on commit 0ed5a58

Please sign in to comment.