Skip to content

Commit

Permalink
Fix(version): allow Angular major version other than 2
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhaq-e committed Dec 29, 2016
1 parent 0ce64a4 commit acd8464
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/angular-cli/upgrade/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ export class Version {
if (v.isLocal()) {
console.warn(yellow('Using a local version of angular. Proceeding with care...'));
} else {
if (v.major != 2 || ((v.minor == 3 && v.patch == 0) || v.minor < 3)) {
if (v.major < 2
|| (v.major < 2 && v.minor < 3)
|| (v.major < 2 && v.minor < 3 && v.patch < 1)) {
console.error(bold(red(stripIndents`
This version of CLI is only compatible with angular version 2.3.1 or better. Please
upgrade your angular version, e.g. by running:
npm install @angular/core@latest
` + '\n')));
process.exit(3);
Expand All @@ -129,7 +131,7 @@ export class Version {
It seems like you're using a project generated using an old version of the Angular CLI.
The latest CLI now uses webpack and has a lot of improvements including a simpler
workflow, a faster build, and smaller bundles.
To get more info, including a step-by-step guide to upgrade the CLI, follow this link:
https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14
` + '\n')));
Expand Down

0 comments on commit acd8464

Please sign in to comment.