Skip to content

Commit 7211c1a

Browse files
alan-agius4hansl
authored andcommitted
fix(@angular/cli): update several config warning messages
1 parent 9cdf0f5 commit 7211c1a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/@angular/cli/lib/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ resolve('@angular/cli', { basedir: process.cwd() },
9191
Your global Angular CLI version (${globalVersion}) is greater than your local
9292
version (${localVersion}). The local Angular CLI version is used.
9393
94-
To disable this warning use "ng set --global warnings.versionMismatch=false".
94+
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
9595
`);
9696
// Don't show warning colorised on `ng completion`
9797
if (process.argv[2] !== 'completion') {

packages/@angular/cli/upgrade/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class Version {
162162
163163
npm install typescript@'${currentCombo.typescript}'
164164
165-
To disable this warning run "ng set warnings.typescriptMismatch=false".
165+
To disable this warning run "ng config cli.warnings.typescriptMismatch false".
166166
` + '\n')));
167167
}
168168
}

packages/@angular/cli/utilities/check-package-manager.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ export function checkYarnOrCNPM() {
1919
.then((data: Array<boolean>) => {
2020
const [isYarnInstalled, isCNPMInstalled] = data;
2121
if (isYarnInstalled && isCNPMInstalled) {
22-
console.log(chalk.yellow('You can `ng set --global packageManager=yarn` '
23-
+ 'or `ng set --global packageManager=cnpm`.'));
22+
console.log(chalk.yellow('You can `ng config -g cli.packageManager yarn` '
23+
+ 'or `ng config -g cli.packageManager cnpm`.'));
2424
} else if (isYarnInstalled) {
25-
console.log(chalk.yellow('You can `ng set --global packageManager=yarn`.'));
25+
console.log(chalk.yellow('You can `ng config -g cli.packageManager yarn`.'));
2626
} else if (isCNPMInstalled) {
27-
console.log(chalk.yellow('You can `ng set --global packageManager=cnpm`.'));
27+
console.log(chalk.yellow('You can `ng config -g cli.packageManager cnpm`.'));
2828
} else {
2929
if (packageManager !== 'default' && packageManager !== 'npm') {
3030
console.log(chalk.yellow(`Seems that ${packageManager} is not installed.`));
31-
console.log(chalk.yellow('You can `ng set --global packageManager=npm`.'));
31+
console.log(chalk.yellow('You can `ng config -g cli.packageManager npm`.'));
3232
}
3333
}
3434
});

tests/e2e/tests/commands/new/check-yarn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {ng} from '../../../utils/process';
22
import {getGlobalVariable} from '../../../utils/env';
33

4-
const yarnRegEx = /You can `ng set --global packageManager=yarn`./;
4+
const yarnRegEx = /You can `ng config -g cli.packageManager yarn`./;
55

66
export default function() {
77
return Promise.resolve()

0 commit comments

Comments
 (0)