Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
543b3753
Unverified
Commit
543b3753
authored
Mar 14, 2018
by
Jeremy Morrell
Committed by
GitHub
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more error detection (#536)
Add more error detection for errors involving stack traces
parent
d0cf037e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
failure.sh
lib/failure.sh
+34
-0
No files found.
lib/failure.sh
View file @
543b3753
...
...
@@ -409,6 +409,40 @@ log_other_failures() {
return
0
fi
# [^/C] means that the error is not for a file expected to be within the project
# Ex: Error: Cannot find module 'chalk'
if
grep
-q
"Error: Cannot find module '[^/C
\.
]"
"
$log_file
"
;
then
mcount
"failures.missing-module.npm"
return
0
fi
# / means that the error is for a file expected within the local project
# Ex: Error: Cannot find module '/tmp/build_{hash}/...'
if
grep
-q
"Error: Cannot find module '/"
"
$log_file
"
;
then
mcount
"failures.missing-module.local-absolute"
return
0
fi
# /. means that the error is for a file that's a relative require
# Ex: Error: Cannot find module './lib/utils'
if
grep
-q
"Error: Cannot find module '
\.
"
"
$log_file
"
;
then
mcount
"failures.missing-module.local-relative"
return
0
fi
# [^/C] means that the error is not for a file expected to be found on a C: drive
# Ex: Error: Cannot find module 'C:\Users...'
if
grep
-q
"Error: Cannot find module 'C:"
"
$log_file
"
;
then
mcount
"failures.missing-module.local-windows"
return
0
fi
# matches the subsequent lines of a stacktrace
if
grep
-q
'at [^ ]* \([^ ]*:\d*\d*\)'
"
$log_file
"
;
then
mcount
"failures.unknown-stacktrace"
return
0
fi
# If we've made it this far it's not an error we've added detection for yet
mcount
"failures.unknown"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment