Skip to content

Commit 016a868

Browse files
committed
Fix(version): allow Angular major version other than 2
1 parent 0ce64a4 commit 016a868

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/angular-cli/upgrade/version.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ export class Version {
105105
if (v.isLocal()) {
106106
console.warn(yellow('Using a local version of angular. Proceeding with care...'));
107107
} else {
108-
if (v.major != 2 || ((v.minor == 3 && v.patch == 0) || v.minor < 3)) {
108+
if (v.major < 2 || (v.major < 2 && v.minor < 3) || (v.major < 2 && v.minor < 3 && v.patch < 1)) {
109109
console.error(bold(red(stripIndents`
110110
This version of CLI is only compatible with angular version 2.3.1 or better. Please
111111
upgrade your angular version, e.g. by running:
112-
112+
113113
npm install @angular/core@latest
114114
` + '\n')));
115115
process.exit(3);
@@ -129,7 +129,7 @@ export class Version {
129129
It seems like you're using a project generated using an old version of the Angular CLI.
130130
The latest CLI now uses webpack and has a lot of improvements including a simpler
131131
workflow, a faster build, and smaller bundles.
132-
132+
133133
To get more info, including a step-by-step guide to upgrade the CLI, follow this link:
134134
https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14
135135
` + '\n')));

0 commit comments

Comments
 (0)