Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/danger/danger-js
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Dec 7, 2023
2 parents 874014f + ef8d604 commit 81d8502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@
## Main

<!-- Your comment below this -->
- Clear missing DSL timeout when DSL is found so danger runner can exit faster when done [@normano64]
<!-- Your comment above this -->

## 11.3.1
Expand Down
5 changes: 3 additions & 2 deletions source/commands/danger-runner.ts
Expand Up @@ -51,6 +51,7 @@ const run = (config: SharedCLI) => async (jsonString: string) => {

d("Got STDIN for Danger Run")
foundDSL = true
clearTimeout(missingDSLTimeout)
const dangerFile = dangerfilePath(program)

// Set up the runtime env
Expand Down Expand Up @@ -85,9 +86,9 @@ nodeCleanup((exitCode: number, signal: string) => {
})

// Add a timeout so that CI doesn't run forever if something has broken.
setTimeout(() => {
const missingDSLTimeout = setTimeout(() => {
if (!foundDSL) {
console.error(chalk.red("Timeout: Failed to get the Danger DSL after 1 second"))
console.error(chalk.red("Timeout: Failed to get the Danger DSL after 10 second"))
process.exitCode = 1
process.exit(1)
}
Expand Down

0 comments on commit 81d8502

Please sign in to comment.