Skip to content

Commit

Permalink
fix(@angular/cli): handle promise rejection on analytics install prom…
Browse files Browse the repository at this point in the history
…pt (#15455)

A rejection in this case should be ignored to prevent potential installation failure.
  • Loading branch information
clydin authored and mgechev committed Aug 27, 2019
1 parent 4986577 commit 5606a4c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/angular/cli/bin/postinstall/analytics-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ if ('NG_CLI_ANALYTICS' in process.env) {
try {
var analytics = require('../../models/analytics');

analytics.hasGlobalAnalyticsConfiguration().then(hasGlobalConfig => {
if (!hasGlobalConfig) {
return analytics.promptGlobalAnalytics();
}
});
analytics
.hasGlobalAnalyticsConfiguration()
.then(hasGlobalConfig => {
if (!hasGlobalConfig) {
return analytics.promptGlobalAnalytics();
}
})
.catch(() => {});
} catch (_) {}

0 comments on commit 5606a4c

Please sign in to comment.