Skip to content

Conversation

@CodeByMAB
Copy link
Owner

The set-config.sh scripts were attempting to read from stdin twice:

  1. First with cat to capture JSON configuration
  2. Then again in Python with json.load(sys.stdin)

This caused the Python script to receive empty input, resulting in "Expecting value: line 1 column 1" JSON parsing errors.

Changes:

  • Export CONFIG_JSON as environment variable
  • Read JSON from environment in Python using json.loads()
  • Remove redundant bash grep parsing code
  • Add quotes to heredoc delimiter to prevent variable expansion

This fix applies to both:

  • start9/set-config.sh (main script)
  • start9/scripts/set-config.sh (alternate location)

Tested with sample configuration and verified .env file generation.

The set-config.sh scripts were attempting to read from stdin twice:
1. First with `cat` to capture JSON configuration
2. Then again in Python with `json.load(sys.stdin)`

This caused the Python script to receive empty input, resulting in
"Expecting value: line 1 column 1" JSON parsing errors.

Changes:
- Export CONFIG_JSON as environment variable
- Read JSON from environment in Python using json.loads()
- Remove redundant bash grep parsing code
- Add quotes to heredoc delimiter to prevent variable expansion

This fix applies to both:
- start9/set-config.sh (main script)
- start9/scripts/set-config.sh (alternate location)

Tested with sample configuration and verified .env file generation.
@CodeByMAB CodeByMAB merged commit 6f5b0c1 into main Nov 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants