mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-01 09:13:19 +08:00
core: Add return type to test helper function
This commit is contained in:
@@ -49,7 +49,11 @@ const testEnvVars = {
|
||||
const UUID = '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
|
||||
const DELIMITER = `ghadelimiter_${UUID}`
|
||||
|
||||
function extractErrorMetadata(error: Error) {
|
||||
function extractErrorMetadata(error: Error): {
|
||||
file: string | undefined
|
||||
line: string | undefined
|
||||
column: string | undefined
|
||||
} {
|
||||
const stackLines = error.stack?.split(os.EOL) || []
|
||||
const firstTraceLine = stackLines[1]
|
||||
const match = firstTraceLine.match(/at (?:.*) \((.*):(\d+):(\d+)\)/) || []
|
||||
|
||||
Reference in New Issue
Block a user