@@ -130,15 +130,15 @@ download() {
130130
131131 download_file " $url "
132132 checksum " $file_name " " $checksum_url "
133- if [ " $os_name " = " Linux" ] || [ " $os_name " = " Darwin" ]; then
133+ if [ " $os_name_arch " = " Linux x86_64 " ] || [ " $os_name_arch " = " Darwin x86_64 " ]; then
134134 mv " $file_name " " $output_filename "
135135 fi
136136
137137 cd " $original_folder "
138138}
139139
140140download_reporter () {
141- if [ " $os_name " = " Linux" ] || [ " $os_name " = " Darwin" ]; then
141+ if [ " $os_name_arch " = " Linux x86_64 " ] || [ " $os_name_arch " = " Darwin x86_64 " ]; then
142142 # OS name lower case
143143 suffix=$( echo " $os_name " | tr ' [:upper:]' ' [:lower:]' )
144144 else
@@ -176,6 +176,7 @@ is_self_hosted_instance() {
176176}
177177
178178os_name=$( uname)
179+ os_name_arch=$( uname -sm)
179180
180181# This version should be one that matches the latest self hosted release.
181182SELF_HOSTED_CODACY_REPORTER_VERSION=" 13.13.9"
@@ -203,7 +204,7 @@ if [ -z "$CODACY_REPORTER_TMP_FOLDER" ]; then
203204fi
204205
205206# Set binary name
206- if [ " $os_name " = " Linux" ] || [ " $os_name " = " Darwin" ]; then
207+ if [ " $os_name_arch " = " Linux x86_64 " ] || [ " $os_name_arch " = " Darwin x86_64 " ]; then
207208 reporter_filename=" codacy-coverage-reporter"
208209else
209210 reporter_filename=" codacy-coverage-reporter-assembly.jar"
@@ -220,7 +221,7 @@ reporter_path="$reporter_folder"/"$reporter_filename"
220221
221222download_reporter " $reporter_path " " $reporter_folder " " $reporter_filename "
222223
223- if [ " $os_name " = " Linux" ] || [ " $os_name " = " Darwin" ]; then
224+ if [ " $os_name_arch " = " Linux x86_64 " ] || [ " $os_name_arch " = " Darwin x86_64 " ]; then
224225 chmod +x " $reporter_path "
225226 run_command=" $reporter_path "
226227else
0 commit comments