Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const appSetup = yield api.appSetup(heroku, testRun.app_setup.id)
const noSetup = context.flags['no-setup']
cli.log(`${noSetup ? 'Attaching' : 'Running setup and attaching'} to test dyno...`)
if (noSetup) {
cli.warn('Skipping test setup phase.')
cli.warn(`Run \`${SETUP_COMMAND}\``)
cli.warn('to execute a build and configure the environment')
}
const testNodes = yield api.testNodes(heroku, testRun.id)
const dyno = new Dyno({
heroku,
app: appSetup.app.id,
showStatus: false
})
dyno.dyno = { attach_url: Utils.dig(testNodes, 0, 'dyno', 'attach_url') }
function sendSetup (data, connection) {
if (data.toString().includes('$')) {
dyno.write(SETUP_COMMAND + '\n')
dyno.removeListener('data', sendSetup)
}
}
if (!noSetup) {
dyno.on('data', sendSetup)