Skip to content

Commit 31f5585

Browse files
committed
test
1 parent e413405 commit 31f5585

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

dist/gcc_matcher.jsontemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"owner": "gcc-problem-matcher",
55
"pattern": [
66
{
7-
"regexp": "^(${{ BASE }})(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
7+
"regexp": "^(${{ BASE }}\\/?)(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
88
"fromPath": 1,
99
"file": 2,
1010
"line": 3,

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,7 @@ const core = __nccwpck_require__(127);
28482848
// escapeRegExp :: string => string
28492849
// escape all characters with special meanings in regexp
28502850
const escapeRegExp = (s) =>
2851-
s.replace(/[/\-^$*+?.()|[\]{}]/g, "\\$&");
2851+
s.replace(/[/\-^$*+?.()|[\]{}]/g, "\\\\$&");
28522852

28532853
// variable :: string => RegExp
28542854
// create regex to match ${{ key }}
@@ -2859,7 +2859,7 @@ const variable = (key) =>
28592859
const templatePath = __nccwpck_require__.ab + "gcc_matcher.jsontemplate";
28602860

28612861
// matcherPath :: string
2862-
const matcherPath = __nccwpck_require__.ab + "gcc_matcher.json";
2862+
const outputPath = __nccwpck_require__.ab + "gcc_matcher.json";
28632863

28642864
// rootdir :: string
28652865
const rootdir = core.getInput('build-directory', {required: false});

src/gcc_matcher.jsontemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"owner": "gcc-problem-matcher",
55
"pattern": [
66
{
7-
"regexp": "^(${{ BASE }})(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
7+
"regexp": "^(${{ BASE }}\\/?)(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
88
"fromPath": 1,
99
"file": 2,
1010
"line": 3,

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const core = require('@actions/core');
55
// escapeRegExp :: string => string
66
// escape all characters with special meanings in regexp
77
const escapeRegExp = (s) =>
8-
s.replace(/[/\-^$*+?.()|[\]{}]/g, "\\$&");
8+
s.replace(/[/\-^$*+?.()|[\]{}]/g, "\\\\$&");
99

1010
// variable :: string => RegExp
1111
// create regex to match ${{ key }}
@@ -16,7 +16,7 @@ const variable = (key) =>
1616
const templatePath = path.join(__dirname, "gcc_matcher.jsontemplate");
1717

1818
// matcherPath :: string
19-
const matcherPath = path.join(__dirname, "gcc_matcher.json");
19+
const outputPath = path.join(__dirname, "gcc_matcher.json");
2020

2121
// rootdir :: string
2222
const rootdir = core.getInput('build-directory', {required: false});
@@ -34,7 +34,7 @@ const parse = (templatePath) => (matcherPath) => {
3434

3535
// main:
3636
try {
37-
parse(templatePath)(matcherPath);
37+
parse(templatePath)(outputPath);
3838
} catch (err) {
3939
core.setFailed(`Action failed with error ${err}`)
4040
}

0 commit comments

Comments
 (0)