[rust] Change command execution to argv#17576
Conversation
Review Summary by QodoRefactor command execution to use argv instead of shell strings
WalkthroughsDescription• Refactor command execution to use argv instead of shell strings • Eliminate unnecessary bash/sh wrapper invocations for direct command execution • Simplify path escaping by removing shell-based escaping logic • Update all command builders to use program + arguments structure Diagramflowchart LR
A["Shell Command Strings<br/>bash -c style"] -->|Refactor| B["Direct Execution<br/>program + argv"]
B -->|Eliminates| C["Unnecessary Shell Wrappers"]
B -->|Simplifies| D["Path Escaping Logic"]
E["Command struct"] -->|Changed from| F["single_arg/multiple_args"]
E -->|Changed to| G["program/args"]
File Changes1. rust/src/shell.rs
|
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit ebdf852 |
|
Code review by qodo was updated up to the latest commit b7a4b56 |
|
Code review by qodo was updated up to the latest commit 9d65292 |
|
Code review by qodo was updated up to the latest commit 03591e5 |
|
Code review by qodo was updated up to the latest commit 519d841 |
🔗 Related Issues
#17521.
💥 What does this PR do?
This PR reworks
shell::Commandto carry a program plus argv, and executes commands directly withstd::process::Command. This change makes not necessary to executebash -cin Linux, which prevents #17521.🔧 Implementation Notes
get_escaped_pathso it only canonicalizes paths and no longer shells out to bash.🤖 AI assistance
💡 Additional Considerations
🔄 Types of changes