Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: override ui write level #2627

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/angular-cli/lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

// This file hooks up on require calls to transpile TypeScript.
const cli = require('ember-cli/lib/cli');
const UI = require('ember-cli/lib/ui');
const path = require('path');

Error.stackTraceLimit = Infinity;

module.exports = function(options) {

// patch UI to not print Ember-CLI warnings (which don't apply to Angular-CLI)
UI.prototype.writeWarnLine = function () { }

const oldStdoutWrite = process.stdout.write;
process.stdout.write = function (line) {
line = line.toString();
if (line.match(/version:|WARNING:/)) {
return;
}
if (line.match(/ember-cli-(inject-)?live-reload/)) {
// don't replace 'ember-cli-live-reload' on ng init diffs
return oldStdoutWrite.apply(process.stdout, arguments);
Expand All @@ -38,8 +40,6 @@ module.exports = function(options) {

// ensure the environemnt variable for dynamic paths
process.env.PWD = process.env.PWD || process.cwd();


process.env.CLI_ROOT = process.env.CLI_ROOT || path.resolve(__dirname, '..', '..');

return cli(options);
Expand Down