Skip to content

Commit ea6bde1

Browse files
committed
fix: handle trailing commas in build-env JSON
1 parent ee7ed87 commit ea6bde1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ runs:
426426
427427
// Parse build-env and add as base vars (wrangler env vars take precedence)
428428
console.log("Build env JSON:", buildEnvJson);
429-
const buildEnv = JSON.parse(buildEnvJson);
429+
const buildEnv = JSON.parse(buildEnvJson.replace(/,\s*([}\]])/g, "$1"));
430430
if (Object.keys(buildEnv).length > 0) {
431431
envConfig.vars = { ...buildEnv, ...(envConfig.vars || {}) };
432432
}

0 commit comments

Comments
 (0)