set GOOS=linux for the staticcheck tool

This commit is contained in:
帝俊 2021-01-12 18:00:36 +08:00 committed by GitHub
parent 65395137b5
commit 7c487f9964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ while read -r error; do
elif [[ "${in_failing}" -eq "0" ]]; then
really_failing+=( "$pkg" )
fi
done < <(staticcheck -checks "${checks}" "${all_packages[@]}" 2>/dev/null || true)
done < <(GOOS=linux staticcheck -checks "${checks}" "${all_packages[@]}" 2>/dev/null || true)
export IFS=$'\n' # Expand ${really_failing[*]} to separate lines
kube::util::read-array really_failing < <(sort -u <<<"${really_failing[*]}")