Declare variables separately when assigning the result of $()

This commit is contained in:
Kamil Śliwak
2021-03-04 16:53:05 +01:00
parent 1c7cc376d1
commit 75b87d159d
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -51,12 +51,12 @@ function compileFull()
local files=("$@")
local stderr_path=$(mktemp)
local stderr_path; stderr_path=$(mktemp)
set +e
"$SOLC" "${args[@]}" "${files[@]}" >/dev/null 2>"$stderr_path"
local exit_code=$?
local errors=$(grep -v -E 'Warning: This is a pre-release compiler version|Warning: Experimental features are turned on|pragma experimental ABIEncoderV2|^ +--> |^ +\||^[0-9]+ +\|' < "$stderr_path")
local errors; errors=$(grep -v -E 'Warning: This is a pre-release compiler version|Warning: Experimental features are turned on|pragma experimental ABIEncoderV2|^ +--> |^ +\||^[0-9]+ +\|' < "$stderr_path")
set -e
rm "$stderr_path"