Skip to content

Commit

Permalink
fix(Analytics): Ensure to send payload when having all meta
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Nov 3, 2020
1 parent ed328f1 commit d2b378b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/plugins/deploy/deploy.js
Expand Up @@ -114,14 +114,14 @@ class Deploy {
});
}

this.deferredBackendNotificationRequest = analyticsReport(
Object.assign(generateAnalyticsPayload(this.serverless), { command: 'deploy' })
);

if (!this.options.package && !this.serverless.service.package.path) {
return this.serverless.pluginManager.spawn('package');
}
return null;
return (!this.options.package && !this.serverless.service.package.path
? BbPromise.resolve(this.serverless.pluginManager.spawn('package'))
: BbPromise.resolve()
).finally(() => {
this.deferredBackendNotificationRequest = analyticsReport(
Object.assign(generateAnalyticsPayload(this.serverless), { command: 'deploy' })
);
});
}),
'after:deploy:finalize': () => {
if (!this.deferredBackendNotificationRequest) return null;
Expand Down

0 comments on commit d2b378b

Please sign in to comment.