diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index f3a8d8bda..c30cd53a4 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -125711,10 +125711,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 7a9ddd21d..7deaec120 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -130434,10 +130434,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index d581716db..122c056af 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -124624,10 +124624,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 546458254..1a369d779 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -124646,10 +124646,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 3d5d45e94..66b2debce 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -260,10 +260,9 @@ export function getArtifactSuffix(matrix: string | undefined): string { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) as any[][], - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix) as any[][]; + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.",