Skip to content

Commit 106ca84

Browse files
authored
Fix pipeline stacktrace syntax error on CI. (#336)
* Pipeline: Additional information for stack trace error messages * Pipeline: Disable source maps to enable vm2 syntax error parsing
1 parent 9888ad0 commit 106ca84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pipeline/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/index.js",
66
"scripts": {
77
"start": "npm run transpile && npm run start:transpiled",
8-
"start:transpiled": "node --enable-source-maps dist/index.js",
8+
"start:transpiled": "node dist/index.js",
99
"transpile": "tsc",
1010
"lint": "eslint src --fix",
1111
"lint-ci": "eslint src --max-warnings=0",

pipeline/src/pipeline-execution/sandbox/vm2StacktraceParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import JobError from './jobError'
1010
export function parseStacktraceLine (line: string): [string, string, number, number] {
1111
const match = line.match(/^ +at (.+) \((.+):(\d+):(\d+)\)/)
1212
if (match === null) {
13-
throw new Error('Unexpected stacktrace line format')
13+
throw new Error(`Unexpected stacktrace line format: ${line}`)
1414
}
1515
const [, functionName, fileName, lineNumber, position] = match
1616
return [functionName, fileName, parseInt(lineNumber), parseInt(position)]
@@ -24,7 +24,7 @@ export function parseStacktraceLine (line: string): [string, string, number, num
2424
function parseSyntaxErrorHeader (header: string): [string, number] {
2525
const match = header.match(/^(.+):(\d+)/)
2626
if (match === null) {
27-
throw new Error('Unexpected stacktrace format')
27+
throw new Error(`Unexpected stacktrace format: ${header}`)
2828
}
2929
const [, fileName, lineNumber] = match
3030
return [fileName, parseInt(lineNumber)]

0 commit comments

Comments
 (0)