Skip to content

Commit

Permalink
Prepend plugin dir
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Oct 20, 2023
1 parent de0b139 commit a74afe3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ runs:

- name: Process results
run: |
node dist/index.js ${{ runner.temp }}/plugin-check-results.txt
node dist/index.js ${{ runner.temp }}/plugin-check-results.txt $PLUGIN_DIR
shell: bash
env:
INPUT_REPO_TOKEN: ${{ inputs.repo-token }}
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25886,6 +25886,7 @@ const core_1 = __nccwpck_require__(2186);
const node_fs_1 = __nccwpck_require__(7561);
const args = process.argv.slice(2);
const file = args[0];
const pluginDir = args[1] || '';
if (!(0, node_fs_1.existsSync)(file)) {
(0, core_1.setFailed)('Results file does not exist');
process.exit(0);
Expand All @@ -25902,7 +25903,7 @@ for (let i = 0; i < fileContents.length - 1; i++) {
const func = result.type === 'ERROR' ? core_1.error : core_1.warning;
func(result.message, {
title: result.code,
file: fileName,
file: `${pluginDir}/${fileName}`,
startLine: result.line,
startColumn: result.column,
});
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { existsSync, readFileSync } from 'node:fs';
const args = process.argv.slice(2);

const file = args[0];
const pluginDir = args[1] || '';

if (!existsSync(file)) {
setFailed('Results file does not exist');
Expand Down Expand Up @@ -33,7 +34,7 @@ for (let i = 0; i < fileContents.length - 1; i++) {
const func = result.type === 'ERROR' ? error : warning;
func(result.message, {
title: result.code,
file: fileName,
file: `${pluginDir}/${fileName}`,
startLine: result.line,
startColumn: result.column,
});
Expand Down

0 comments on commit a74afe3

Please sign in to comment.