From 9aa1099d8fd58ca10676ea1c032a3c9f1444ebcb Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 2 Nov 2016 18:43:29 +0000 Subject: [PATCH] fix: bypass Watchman check (#2846) Fix #2791 --- packages/angular-cli/lib/cli/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/angular-cli/lib/cli/index.js b/packages/angular-cli/lib/cli/index.js index 82d965710b2d..aa24ec8e5c78 100644 --- a/packages/angular-cli/lib/cli/index.js +++ b/packages/angular-cli/lib/cli/index.js @@ -3,6 +3,7 @@ // 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 Watcher = require('ember-cli/lib/models/watcher'); const path = require('path'); Error.stackTraceLimit = Infinity; @@ -12,6 +13,13 @@ module.exports = function(options) { // patch UI to not print Ember-CLI warnings (which don't apply to Angular-CLI) UI.prototype.writeWarnLine = function () { } + // patch Watcher to always default to node, not checking for Watchman + Watcher.detectWatcher = function(ui, _options){ + var options = _options || {}; + options.watcher = 'node'; + return Promise.resolve(options); + } + const oldStdoutWrite = process.stdout.write; process.stdout.write = function (line) { line = line.toString();