Skip to content

Commit

Permalink
Add an error about missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Oct 29, 2016
1 parent 93be95b commit 9d0fe5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"lint": "eslint ./source",
"fix": "eslint ./source --fix",
"prepublish": "npm run build",
"build": "babel source --out-dir distribution --source-maps",
"buildwatch": "babel source --watch --out-dir distribution",
"link": "npm run build ; chmod +x distribution/commands/danger.js ; npm link"
Expand Down
6 changes: 5 additions & 1 deletion source/runner/Dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export default class Dangerfile {
readFile(path: String): Promise<string> {
return new Promise((resolve: any, reject: any) => {
fs.readFile(path, "utf8", (err: Error, data: string) => {
if (err) { return reject(err) }
if (err) {
console.error("Error: " + err.message)
process.exitCode = 1
return reject(err)
}
resolve(data)
})
})
Expand Down

0 comments on commit 9d0fe5f

Please sign in to comment.