Skip to content

Commit

Permalink
Add an error code to unforfilled promises
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Nov 7, 2016
1 parent 4495931 commit 4898937
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dangerfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow

import { danger, fail, warn } from "danger"
import fs from "fs"
const fs = require("fs")

// warn on changes in Package.json and not in shrinkwrap
const hasChangelog = danger.git.modified_files.includes("changelog.md")
Expand Down
4 changes: 2 additions & 2 deletions source/commands/danger-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ program
.parse(process.argv)

process.on("unhandledRejection", function(reason: string, p: any) {
console.log("Possibly Unhandled Rejection at: Promise ", p, " reason: ", reason)
// application specific logging here
console.log("Error: ", reason)
process.exitCode = 1
})

const source = getCISourceForEnv(process.env)
Expand Down

0 comments on commit 4898937

Please sign in to comment.