Skip to content

Commit e154765

Browse files
ILindsleyclaude
andcommitted
Fix JSONC parsing in deploy workflow
Strip trailing commas before JSON.parse to handle Prettier formatting. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 170d853 commit e154765

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/deploy-cloudflare.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ jobs:
2525
run: |
2626
node -e "
2727
const fs = require('fs');
28-
const config = JSON.parse(fs.readFileSync('wrangler.jsonc', 'utf8'));
28+
// Strip trailing commas to convert JSONC to valid JSON
29+
const jsonc = fs.readFileSync('wrangler.jsonc', 'utf8');
30+
const json = jsonc.replace(/,(\s*[}\]])/g, '\$1');
31+
const config = JSON.parse(json);
2932
config.vars = {
3033
...config.vars,
3134
AUTH_SECRET: process.env.AUTH_SECRET,

0 commit comments

Comments
 (0)