Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit ea13673

Browse files
authored
fix(core): support ARM 64-bit environments
fix(core): support ARM 64-bit environments
2 parents 0a6ab7b + 0a8b271 commit ea13673

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { platform } from 'os';
1+
import { platform, arch } from 'os';
22
import { chdir } from 'process';
33
import { unlinkSync } from 'fs';
44
import { debug, error, setFailed, warning, info } from '@actions/core';
@@ -13,8 +13,11 @@ import {
1313
} from './utils';
1414
import type { ExecOptions } from '@actions/exec/lib/interfaces';
1515

16+
// REFER: https://docs.codeclimate.com/docs/configuring-test-coverage#locations-of-pre-built-binaries
1617
/** Canonical download URL for the official CodeClimate reporter. */
17-
export const DOWNLOAD_URL = `https://codeclimate.com/downloads/test-reporter/test-reporter-latest-${platform()}-amd64`;
18+
export const DOWNLOAD_URL = `https://codeclimate.com/downloads/test-reporter/test-reporter-latest-${platform()}-${
19+
arch() === 'arm64' ? 'arm64' : 'amd64'
20+
}`;
1821
/** Local file name of the CodeClimate reporter. */
1922
export const EXECUTABLE = './cc-reporter';
2023
export const CODECLIMATE_GPG_PUBLIC_KEY_ID =

0 commit comments

Comments
 (0)