From bf41a253e0bf0cb764ede6b1ef7a965f4c4a190f Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 15 Jan 2020 14:26:33 -0500 Subject: [PATCH] fix(@angular/cli): prevent postinstall script errors from blocking install (cherry picked from commit 94dfb4c0f89187a358adc346a5ce91d5be40f8f4) --- packages/angular/cli/bin/postinstall/script.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/bin/postinstall/script.js b/packages/angular/cli/bin/postinstall/script.js index 676ede7b84c3..26aa53bb7e18 100644 --- a/packages/angular/cli/bin/postinstall/script.js +++ b/packages/angular/cli/bin/postinstall/script.js @@ -1,5 +1,8 @@ #!/usr/bin/env node 'use strict'; -require('./ng-update-message'); -require('./analytics-prompt'); +// These should not fail but if they do they should not block installation of the package +try { + require('./ng-update-message'); + require('./analytics-prompt'); +} catch (_) {}