Skip to content

Commit

Permalink
fix: don't warn on hook errors (#246)
Browse files Browse the repository at this point in the history
* fix: don't warn on hook errors

* fix: unref hook timeout
  • Loading branch information
mdonnalley authored Sep 15, 2021
1 parent 7b74755 commit ba4be4b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class Config implements IConfig {
const timeout = new Promise((_, reject) => {
id = setTimeout(() => {
reject(new Error(`Timed out after ${ms} ms.`))
}, ms)
}, ms).unref()
})

return Promise.race([promise, timeout]).then(result => {
Expand Down Expand Up @@ -265,7 +265,6 @@ export class Config implements IConfig {
} catch (error) {
failures.push({plugin: p, error: error as Error})
if (error && error.oclif && error.oclif.exit !== undefined) throw error
this.warn(error, `runHook ${event}`)
}
}
}
Expand Down

0 comments on commit ba4be4b

Please sign in to comment.