Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* Executing instructions in sequence. Do not convert this block to
* parallel execution, since two instructions touching the same
* file may lead to race conditions.
*/
try {
for (let pkg of Object.keys(packages[state.boilerplate])) {
await executeInstructions(pkg, absPath, application)
}
} catch (error) {
instructionsError = error
}
/**
* Print logs and filter out duplicate one's
*/
logger.resumeLogger((message) => {
if (LOG_MESSAGES.has(message.message as string) && message.action !== 'fatal') {
return false
}
LOG_MESSAGES.add(message.message as string)
return true
})
/**
* Handle error
*/
if (instructionsError) {
logger.fatal(instructionsError)
throw instructionsError
}
}