10000 Add matcher · vvoody/setup-python@f7f8dba · GitHub
[go: up one dir, main page]

Skip to content

Commit f7f8dba

Browse files
author
Danny McCormick
committed
Add matcher
1 parent 87886b8 commit f7f8dba

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.github/python.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "python",
5+
"pattern": [
6+
{
7+
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)\\s*raise\\s(.*)\\(\\'(.*)\\'\\)\\s*(.*)\\:\\s.*$",
8+
"file": 1,
9+
"line": 2,
10+
"severity": 4,
11+
"message": 5
12+
}
13+
]
14+
}
15+
]
16+
}

lib/setup-python.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
1717
Object.defineProperty(exports, "__esModule", { value: true });
1818
const core = __importStar(require("@actions/core"));
1919
const finder = __importStar(require("./find-python"));
20+
const path = __importStar(require("path"));
2021
function run() {
2122
return __awaiter(this, void 0, void 0, function* () {
2223
try {
@@ -25,6 +26,8 @@ function run() {
2526
const arch = core.getInput('architecture', { required: true });
2627
yield finder.findPythonVersion(version, arch);
2728
}
29+
const matchersPath = path.join(__dirname, '..', '.github');
30+
console.log(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
2831
}
2932
catch (err) {
3033
core.setFailed(err.message);

src/setup-python.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as core from '@actions/core';
22
import * as finder from './find-python';
3+
import * as path from 'path';
34

45
async function run() {
56
try {
@@ -8,6 +9,8 @@ async function run() {
89
const arch: string = core.getInput('architecture', {required: true});
910
await finder.findPythonVersion(version, arch);
1011
}
12+
const matchersPath = path.join(__dirname, '..', '.github');
13+
console.log(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
1114
} catch (err) {
1215
core.setFailed(err.message);
1316
}

0 commit comments

Comments
 (0)
0