From 7ebe093131c5156e4634a5c285732a6d1dd3b92b Mon Sep 17 00:00:00 2001 From: Dale Sande Date: Fri, 21 Jun 2019 20:37:57 -0700 Subject: [PATCH] fix: address bug with version check --- bin/generate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/generate.js b/bin/generate.js index 01aa0239..700be7ad 100755 --- a/bin/generate.js +++ b/bin/generate.js @@ -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) { @@ -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 {