Skip to content

Commit 9787ba6

Browse files
committed
feat(core): Support Windows
BREAKING CHANGE: Support Windows, now that CodeClimate has released a Windows binary of the reporter
1 parent da4a6ce commit 9787ba6

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/main.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import type { ExecOptions } from '@actions/exec/lib/interfaces';
1515

1616
// REFER: https://docs.codeclimate.com/docs/configuring-test-coverage#locations-of-pre-built-binaries
1717
/** Canonical download URL for the official CodeClimate reporter. */
18-
export const DOWNLOAD_URL = `https://codeclimate.com/downloads/test-reporter/test-reporter-latest-${platform()}-${
19-
arch() === 'arm64' ? 'arm64' : 'amd64'
20-
}`;
18+
export const DOWNLOAD_URL = `https://codeclimate.com/downloads/test-reporter/test-reporter-latest-${
19+
platform() === 'win32' ? 'windows' : platform()
20+
}-${arch() === 'arm64' ? 'arm64' : 'amd64'}`;
2121
/** Local file name of the CodeClimate reporter. */
2222
export const EXECUTABLE = './cc-reporter';
2323
export const CODECLIMATE_GPG_PUBLIC_KEY_ID =
@@ -179,13 +179,6 @@ export function run(
179179
verifyDownload: string = DEFAULT_VERIFY_DOWNLOAD
180180
): Promise<void> {
181181
return new Promise(async (resolve, reject) => {
182-
if (platform() === 'win32') {
183-
const err = new Error('CC Reporter is not supported on Windows!');
184-
error(err.message);
185-
setFailed('🚨 CodeClimate Reporter will not run on Windows!');
186-
return reject(err);
187-
}
188-
189182
let lastExitCode = 1;
190183
if (workingDirectory) {
191184
debug(`Changing working directory to ${workingDirectory}`);

0 commit comments

Comments
 (0)