commands/promote.js
Function run
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function * run (context, heroku) {
const fetcher = require('../lib/fetcher')(heroku)
const {app, args} = context
const attachment = yield fetcher.attachment(app, args.database)
let current
Avoid deeply nested control flow statements. Open
Open
} else if (Date.now() > endTime) {
return cli.action.done('timeout. Check your Attach DATABASE release for failures.')
}
Avoid deeply nested control flow statements. Open
Open
if (detach && detach.status === 'succeeded') {
msg += 'without an attached DATABASE_URL.'
} else {
msg += `with ${current.addon.name} attached as DATABASE_URL.`
}