[PR #1733] Fix comma-separated argument parsing for single Chrome flags with internal commas #2992

Closed
opened 2026-03-01 18:01:20 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/1733

State: closed
Merged: No


Summary

  • Fixed getEnvArray() to correctly handle single Chrome flags that contain internal commas (e.g., --user-data-dir=/path/with,comma/dir)
  • Added comprehensive JSDoc documentation explaining parsing priority and recommending JSON format for complex arguments
  • Exported getEnvArray function for consistency with other environment helpers

Test plan

  • Verify getEnvArray returns single-element array for --user-data-dir=/path,with,commas
  • Verify getEnvArray still splits correctly for --arg1,--arg2,--arg3
  • Verify JSON array parsing still works: '["--arg1", "--arg2=val,ue"]'
  • Verify simple comma-separated values still work: 'a,b,c'

🤖 Generated with Claude Code


Summary by cubic

Fixed getEnvArray to treat single Chrome flags with internal commas as one argument instead of splitting. Added JSDoc explaining parse order, exported getEnvArray, and recommended using JSON arrays for complex Chrome args.

Written for commit 25b6fa5cba. Summary will update on new commits.

**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/1733 **State:** closed **Merged:** No --- ## Summary - Fixed `getEnvArray()` to correctly handle single Chrome flags that contain internal commas (e.g., `--user-data-dir=/path/with,comma/dir`) - Added comprehensive JSDoc documentation explaining parsing priority and recommending JSON format for complex arguments - Exported `getEnvArray` function for consistency with other environment helpers ## Test plan - [ ] Verify `getEnvArray` returns single-element array for `--user-data-dir=/path,with,commas` - [ ] Verify `getEnvArray` still splits correctly for `--arg1,--arg2,--arg3` - [ ] Verify JSON array parsing still works: `'["--arg1", "--arg2=val,ue"]'` - [ ] Verify simple comma-separated values still work: `'a,b,c'` 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixed getEnvArray to treat single Chrome flags with internal commas as one argument instead of splitting. Added JSDoc explaining parse order, exported getEnvArray, and recommended using JSON arrays for complex Chrome args. <sup>Written for commit 25b6fa5cbadd1818267c7e889e372517c8d3b3a0. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
kerem 2026-03-01 18:01:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2992
No description provided.