Skip to content

Commit 17975cd

Browse files
committed
Declare and assign separately to avoid masking return values
1 parent b4ffb91 commit 17975cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/ci/circle/script

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ create_dir() {
151151
#
152152
# $1 - log file path
153153
create_log_file() {
154-
local owner=$(whoami)
154+
local owner
155+
owner=$(whoami)
155156
echo "Creating an output log file: $1." >&2
156157
sudo touch "$1"
157158
sudo chown "${owner}:${owner}" "$1"
@@ -374,8 +375,10 @@ find_tests() {
374375
# $1 - total number of nodes
375376
# $2 - node index
376377
allocate_tests() {
378+
local tests
379+
377380
# Keep those tests (rows) where the VM index equals the modulo:
378-
local tests=$(find_tests | sort | awk -v "n=$1" -v "i=$2" '{if (NR % n == i) printf "%s ", $0} END {print ""}')
381+
tests=$(find_tests | sort | awk -v "n=$1" -v "i=$2" '{if (NR % n == i) printf "%s ", $0} END {print ""}')
379382
echo "${tests}"
380383
}
381384

0 commit comments

Comments
 (0)