Skip to content

Commit 381d949

Browse files
committed
chore(gen): make sure users are using yo >= 1.7.1
1 parent 4709845 commit 381d949

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

script-base.js

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ var Generator = module.exports = function Generator() {
1515

1616
this.lodash = lodash;
1717

18+
if(!process.env.CI) {
19+
yoCheckPromise = genUtils.runCmd('yo --version').then(stdout => {
20+
if(!semver.satisfies(semver.clean(stdout), '>= 1.7.1')) {
21+
throw new Error('ERROR: You need to update yo to at least 1.7.1 (npm i -g yo)');
22+
}
23+
});
24+
} // CI won't have yo installed
25+
1826
try {
1927
this.appname = require(path.join(process.cwd(), 'bower.json')).name;
2028
} catch (e) {

0 commit comments

Comments
 (0)