Skip to content

Commit c4376d0

Browse files
clydinalexeagle
authored andcommitted
fix(@angular/cli): explicitly define console color logging
1 parent d849834 commit c4376d0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/angular/cli/lib/cli/index.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
8+
import { terminal } from '@angular-devkit/core';
99
import { createConsoleLogger } from '@angular-devkit/core/node';
1010
import { runCommand } from '../../models/command-runner';
1111
import { getWorkspaceRaw } from '../../utilities/config';
1212
import { getWorkspaceDetails } from '../../utilities/project';
1313

1414

1515
export default async function(options: { testing?: boolean, cliArgs: string[] }) {
16-
const logger = createConsoleLogger();
16+
const logger = createConsoleLogger(
17+
false,
18+
process.stdout,
19+
process.stderr,
20+
{
21+
warn: s => terminal.bold(terminal.yellow(s)),
22+
error: s => terminal.bold(terminal.red(s)),
23+
fatal: s => terminal.bold(terminal.red(s)),
24+
},
25+
);
1726

1827
let projectDetails = getWorkspaceDetails();
1928
if (projectDetails === null) {

0 commit comments

Comments
 (0)