fix: [PRO-469] remove double quotes from .env file generation#114
Merged
Conversation
Fixed environment variable generation to write values without double quotes, following standard .env file conventions. This resolves an issue where secrets were being wrapped in quotes and causing authentication and configuration problems. Changes: - Updated initialize.ts to remove quote wrapping from env values - Added comprehensive tests for .env file generation - Verified standard KEY=value format (not KEY="value") Test coverage: - Added test/env-generation.test.ts with 4 test cases - All 28 tests pass (96.78% coverage maintained) - Build and lint checks pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Synced yarn.lock from main branch to fix build mutation errors in CI. The lockfile was out of sync causing the self-mutation check to fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
xpander-moriel
approved these changes
Dec 10, 2025
xpander-moriel
left a comment
Contributor
There was a problem hiding this comment.
Pay attention @dudutwizer
We're not using npm in the cli, we use yarn :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notion Ticket
https://www.notion.so/xpander/CLI-Bug-env-file-being-generated-with-strings-causing-serious-issue-2c529ef830b380a29936f1ab61d91a7a
Summary
.envfile generation to write environment variables without double quotesKEY="value"format to standardKEY=valueformatProblem
The CLI was generating
.envfiles with double quotes around values:This caused serious issues because many environment variable parsers treat the quotes as part of the value, leading to authentication failures and configuration problems.
Solution
Updated initialize.ts:257-260 to remove template literal quote wrapping:
Before:
After:
Now generates standard format:
Test Plan
npm run build✅node lib/index.js --version✅node lib/index.js --help✅test/env-generation.test.ts✅Test Coverage Added
Created
test/env-generation.test.tswith 4 comprehensive test cases:🤖 Generated with Claude Code
Note
Stops quoting values in generated
.envand adds tests to enforce standard KEY=value format.XPANDER_API_KEY,XPANDER_ORGANIZATION_ID, andXPANDER_AGENT_IDinsrc/commands/agent/interactive/initialize.tsto emitKEY=value(no quotes).test/env-generation.test.tswith cases verifying unquoted values, standardKEY=valueformat, special character handling, and empty values.Written by Cursor Bugbot for commit 592a183. This will update automatically on new commits. Configure here.