Skip to content

Commit

Permalink
fix: address bug with version check
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Jun 22, 2019
1 parent de9b829 commit 7ebe093
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const generateFromTemplate = async () => {
const pjson = require('../package.json');
const latestVersion = require('latest-version');
const latestPublishedVersion = await latestVersion('@alaskaairux/ods-wc-generator');
log(chalk.green(latestPublishedVersion))
const params = parseArgs();

if(latestPublishedVersion > pjson.version) {
Expand All @@ -182,7 +183,7 @@ const generateFromTemplate = async () => {
log(chalk.red(` p:::::::p `));
log(chalk.red(` p:::::::p `));
log(chalk.red(` ppppppppp \n\n`));
log(chalk.red(`\nSorry, we have to stop you here.\nIt's been detected you have v${pjson.version} installed,\nand the latest version is v${latestPublishedVersion}. Please run the following:\n\nnpm i @alaskaairux/ods-button@${latestPublishedVersion} -g\n\nfor the latest version.\n`))
log(chalk.red(`\nSorry, we have to stop you here.\nIt's been detected you have v${pjson.version} installed,\nand the latest version is v${latestPublishedVersion}. Please run the following:\n\nnpm i @alaskaairux/ods-wc-generator@${latestPublishedVersion} -g\n\nfor the latest version.\n`))
}

else {
Expand Down

0 comments on commit 7ebe093

Please sign in to comment.