File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## Unreleased
99
10+ ### Added
11+
12+ - The output from ` dapp build ` now uses color to differentiate warnings and errors
13+
1014### Changed
1115
1216- Dapp remappings ignores non-directories in ` DAPP_LIB `
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ info() {
2727 echo >&2 " $FLAGS " " ${0##*/ } : $ARGS "
2828}
2929
30+ colorize () {
31+ awk ' {
32+ gsub("Warning:", "\033[1;33m&\033[0m");
33+ gsub(".*Error:", "\033[1;31m&\033[0m");
34+ print }'
35+ }
36+
3037cd " $DAPP_ROOT "
3138
3239# use a custom path if DAPP_SOLC is set
@@ -68,7 +75,7 @@ if [[ -z "$DAPP_BUILD_LEGACY" && -z "$DAPP_BUILD_EXTRACT" ]]; then
6875
6976 # pipe errors to stderr
7077 jq -r ' if .errors then .errors | map(."formattedMessage") | @sh else empty end' " $DAPP_JSON " \
71- | sed -e " s/' //g" -e " s/'//g" 1>&2
78+ | sed -e " s/' //g" -e " s/'//g" -e ' s/\\\(.\)\\/\1 /g ' | colorize 1>&2
7279 # if sources is empty, the compilation failed
7380 [[ $( jq -r ' .sources' " $DAPP_JSON " ) = " null" || $( jq -r ' .sources' " $DAPP_JSON " ) = {} ]] && exit 1 || exit 0
7481
You can’t perform that action at this time.
0 commit comments