Skip to content

Commit

Permalink
fix: include the platform in the title
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Mar 21, 2024
1 parent 948e556 commit f44ffa9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { getExecOutput as exec } from '@actions/exec';

const cwd = process.env.GITHUB_WORKSPACE ?? process.cwd();
const temp = process.env.RUNNER_TEMP ?? tmpdir();
const os = process.env.RUNNER_OS ?? ({
'linux': 'Linux',
'darwin': 'macOS',
'win32': 'Windows',
})[process.platform];

/**
* @param {string} listFile
Expand Down Expand Up @@ -55,12 +60,13 @@ for (const line of output.trimEnd().split('\n')) {
action.info(result + ' [EXPECTED]');
totalInvalid += 1;
} else {
action.warning(result, { file, title: 'INVALID' });
action.warning(result, { file, title: `INVALID (${os})` });
totalSuccess += 1;
}
} else if (result.endsWith(')')) {
const matches = result.match(matcher);
const [_, title, row1, col1, row2, col2] = matches;
const [_, error, row1, col1, row2, col2] = matches;
const title = `${error} (${os})`;
const startLine = parseInt(row1) + 1;
const startColumn = parseInt(col1) + 1;
const endLine = parseInt(row2) + 1;
Expand Down

0 comments on commit f44ffa9

Please sign in to comment.