IEP-1471 ESP-IDF Path with whitespaces leads to python error during FLASH#1205
Conversation
WalkthroughThe changes improve the way command-line arguments are parsed and handled across several modules. Instead of splitting command strings by spaces, the code now uses a specialized parsing utility ( Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant VariableResolver
participant CommandBuilder
User->>VariableResolver: Request variable resolution
VariableResolver->>VariableResolver: Resolve value
alt Value contains spaces
VariableResolver->>VariableResolver: Wrap value in quotes
end
VariableResolver-->>User: Return resolved value
User->>CommandBuilder: Provide command string with variables
CommandBuilder->>CommandBuilder: Substitute variables
CommandBuilder->>CommandLineUtil: Parse command string with argumentsToArray
CommandLineUtil-->>CommandBuilder: Return parsed arguments array
CommandBuilder-->>User: Use parsed arguments for command execution
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
|
||
| // Wrap the resolved value in quotes if it contains spaces or special characters | ||
| if (resolvedValue != null && resolvedValue.contains(" ")) //$NON-NLS-1$ | ||
| { | ||
| resolvedValue = "\"" + resolvedValue + "\""; //$NON-NLS-1$ //$NON-NLS-2$ | ||
| } |
There was a problem hiding this comment.
This generally seems okay we just need to be sure that double quotes work on all platforms. It might be okay because we are running most of these commands through Java not via shell but it should be verified on all platforms note for @AndriiFilippov
|
@sigmaaa hi ! Tested under: able to flash if ${BUILD_DIR} wrap in " " without " " -> error: |
Hi @AndriiFilippov, Fixed in the last commit, no need for putting quotes manually for the BUILD_DIR variable now |
|
LGTM 👍 |


Description
Fixed an issue with flash when esp-idf path contains spaces.
Fixes # (IEP-1471)
Type of change
Please delete options that are not relevant.
How has this been tested?
Test Configuration:
Dependent components impacted by this PR:
Checklist
Summary by CodeRabbit