Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
): Promise {
if (updateMetadata.rollout === 100) {
// If rollout is 100% we shouldn't pass it in the HTTP request
delete updateMetadata.rollout
}
try {
return this.codePush.promote(
appName,
sourceDeploymentName,
destinationDeploymentName,
updateMetadata
)
} catch (error) {
if (
disableDuplicateReleaseError &&
error.statusCode === CodePush.ERROR_CONFLICT
) {
log.warn(error.message)
} else {
throw new Error(error)
}
}
}