Skip to content

Commit

Permalink
Add problem matcher (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny McCormick authored Jul 12, 2019
1 parent 9242e91 commit 4fa0fd2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/java.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "java",
"pattern": [
{
"regexp": "^Exception in thread \"(.*)\" (.*): (.*)$",
"code": 2,
"message": 3
}
]
}

This comment has been minimized.

Copy link
@triaeruu

triaeruu Mar 21, 2024

I need help

]
}
File renamed without changes.
3 changes: 3 additions & 0 deletions lib/setup-java.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const installer = __importStar(require("./installer"));
const path = __importStar(require("path"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
const version = core.getInput('version', { required: true });
const arch = core.getInput('architecture', { required: true });
const jdkFile = core.getInput('jdkFile', { required: true });
yield installer.getJava(version, arch, jdkFile);
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
}
catch (error) {
core.setFailed(error.message);
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/setup-java.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as core from '@actions/core';
import * as installer from './installer';
import * as path from 'path';

async function run() {
try {
Expand All @@ -8,6 +9,9 @@ async function run() {
const jdkFile = core.getInput('jdkFile', {required: true});

await installer.getJava(version, arch, jdkFile);

const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit 4fa0fd2

Please sign in to comment.