Skip to content

Commit

Permalink
fix: update command in addon generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Dec 10, 2021
1 parent 473ea59 commit dd2409b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generators/addon/index.js
@@ -1,4 +1,6 @@
const process = require('process');
const chalk = require('chalk');
const semver = require('semver');
const Insight = require('insight');
const camelCase = require('lodash.camelcase');
const upperFirst = require('lodash.upperfirst');
Expand Down Expand Up @@ -34,7 +36,7 @@ class NgxAddonGenerator extends Generator {
}

if (fromVersion) {
if (fromVersion >= this.version) {
if (semver.gte(fromVersion, this.version)) {
this.log(chalk.green('\nNothing to update, it’s all good!\n'));
// eslint-disable-next-line unicorn/no-process-exit
process.exit(0);
Expand Down

0 comments on commit dd2409b

Please sign in to comment.