Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// update spinner state
spinner.text = `Downloading UI5... [${iStep}/${iTotalSteps}] ${Math.round(
oStepDetails.progress || 0
)}% (${oStepDetails.name})`
}
}
if (isDownloadRequired) {
// update spinner state
spinner.text =
'Downloading UI5... (this task can take several minutes, please be patient)'
}
// return promise
return isDownloadRequired
? ui5Download(sCompiledURL, sDownloadPath, sUI5Version, oDownloadOptions)
.then(sSuccessMessage => {
spinner.succeed(sSuccessMessage)
spinner.start('')
})
.catch(sErrorMessage => {
spinner.fail(sErrorMessage)
spinner.start('')
})
: Promise.resolve()
} catch (error) {
spinner.fail(error)
}
}