Log original error for easier debugging of the underlying build error #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when a build error occurs, the
catch
withinlib/install.js
is overriding the error's message with a static error message. This ends up hiding the underlying issue. In my case, on OSX10.14.2
I did abrew install libpng
per the static error message and nothing changed. This caused me wonder what was actually happening. Upon digging into the source it became clear the actual build error was not being surfaced. This change surfaces the real underlying issue. See the before and after output below:Before
After
A quick search on
zlib-devel
for OSX turned up an SO post: https://stackoverflow.com/questions/23749530/brew-install-zlib-devel-on-mac-os-x-mavericks which made me realize I had an issue with myxcode-select
tools. Without the more descriptive error, I wouldn't have realized what was actually causing my issue.