fix(cli): quote ENV vars when it contains spaces#329
Merged
endersonmaia merged 2 commits intoprerelease/v2-alphafrom Sep 18, 2025
Merged
fix(cli): quote ENV vars when it contains spaces#329endersonmaia merged 2 commits intoprerelease/v2-alphafrom
endersonmaia merged 2 commits intoprerelease/v2-alphafrom
Conversation
🦋 Changeset detectedLatest commit: d8f3270 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes environment variable handling in the CLI's Docker image build process by properly quoting environment variable values that contain spaces, preventing parsing errors when passing them to cartesi-machine.
- Enhanced environment variable processing to detect and quote values containing spaces
- Added proper changeset documentation for the patch
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/cli/src/machine.ts | Updated env variable mapping logic to quote values with spaces |
| .changeset/chilly-ducks-work.md | Added changeset documentation for the fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Coverage Report for ./apps/cli
File Coverage
|
||||||||||||||||||||||||||||||||||||||
4029425 to
c89166e
Compare
tuler
reviewed
Sep 18, 2025
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.
This pull request addresses an issue with environment variable handling during Docker image builds in the CLI. The main improvement ensures that environment variable values containing spaces are properly quoted, preventing potential errors when passing them to cartesi-machine to boot.
Environment variable handling improvements:
apps/cli/src/machine.ts, updated the logic for constructing cartesi-machine--envarguments to detect environment variable values containing spaces and wrap those values in quotes. This ensures correct parsing by Docker when environment variables include spaces.Documentation:
.changeset/chilly-ducks-work.mddocumenting this patch and describing the quoting of environment variables with spaces during build.