[GH-ISSUE #215] Use eval to source environment variable #145

Closed
opened 2026-03-01 14:41:02 +03:00 by kerem · 1 comment
Owner

Originally created by @fr0der1c on GitHub (Apr 11, 2019).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/215

Wiki Page URL

https://github.com/pirate/ArchiveBox/wiki/Configuration#creating-a-config-file

Suggested Edit

change

export $(grep -v '^#' ~/.ArchiveBox.conf | xargs); ./archive https://example.com/rss/feed.xml

to

eval export $(grep -v '^#' ArchiveBox.conf); ./archive https://example.com/rss/feed.xml

The original one doesn't work if there are whitespaces in value, even if the value has been quoted. I found this problem when setting Chrome user profile directory. I'm not a shell hacker but seems the $() subcommand is misinterpreting whitespace and eval solves the problem.

Originally created by @fr0der1c on GitHub (Apr 11, 2019). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/215 ## Wiki Page URL https://github.com/pirate/ArchiveBox/wiki/Configuration#creating-a-config-file ## Suggested Edit change ``` export $(grep -v '^#' ~/.ArchiveBox.conf | xargs); ./archive https://example.com/rss/feed.xml ``` to ``` eval export $(grep -v '^#' ArchiveBox.conf); ./archive https://example.com/rss/feed.xml ``` The original one doesn't work if there are whitespaces in value, even if the value has been quoted. I found this problem when setting Chrome user profile directory. I'm not a shell hacker but seems the `$()` subcommand is misinterpreting whitespace and `eval` solves the problem.
kerem closed this issue 2026-03-01 14:41:02 +03:00
Author
Owner

@pirate commented on GitHub (Apr 15, 2019):

Thanks, fixed!

<!-- gh-comment-id:483429721 --> @pirate commented on GitHub (Apr 15, 2019): Thanks, fixed!
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#145
No description provided.