mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-01-01 14:44:48 +01:00
Improve "BUILD FAILED" output
- "BUILD FAILED" is now printed in red instead of in highlight color. - Print CPU architecture information after OS information. - Do NOT print last 10 lines of the log anymore. Due to the verbosity of compilers, that rarely includes the actual error message, but users think it does and so they paste it in their GitHub reports instead of perusing the log file.
This commit is contained in:
parent
c6f8eb38cf
commit
61e50df552
1 changed files with 5 additions and 7 deletions
|
@ -220,18 +220,16 @@ osx_version() {
|
|||
|
||||
build_failed() {
|
||||
{ echo
|
||||
colorize 1 "BUILD FAILED"
|
||||
echo " ($(os_information) using $(version))"
|
||||
colorize '31;1' "BUILD FAILED"
|
||||
echo " ($(os_information) on $(uname -m) using $(version))"
|
||||
echo
|
||||
|
||||
if ! rmdir "${BUILD_PATH}" 2>/dev/null; then
|
||||
echo "Inspect or clean up the working tree at ${BUILD_PATH}"
|
||||
echo "You can inspect the build directory at ${BUILD_PATH}"
|
||||
|
||||
if [ -n "$(head -1 "$LOG_PATH" 2>/dev/null)" ]; then
|
||||
colorize 33 "Results logged to ${LOG_PATH}"
|
||||
printf "\n\n"
|
||||
echo "Last 10 log lines:"
|
||||
tail -n 10 "$LOG_PATH"
|
||||
colorize 33 "See the full build log at ${LOG_PATH}"
|
||||
printf "\n"
|
||||
fi
|
||||
fi
|
||||
} >&3
|
||||
|
|
Loading…
Reference in a new issue