mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 03:30:40 +00:00
* fix(permissions): match env-prefixed shell commands Fixes #2846 * fix(core): improve shell command parsing for env vars and multiline commands - Add dotAll flag to matchesCommandPattern for matching commands with embedded newlines - Support newline operators in SHELL_OPERATORS for splitCompoundCommand - Refactor getCommandRoot to skip leading VAR=value assignments - Add test coverage for multiline commands and env var prefixed commands Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(permissions): tighten shell command parsing Handle env-prefixed commands and quoted Windows paths consistently. Keep newline splitting heredoc-aware and avoid false heredoc detection in comments or arithmetic expressions. * refactor(permissions): simplify fix by reverting splitCompoundCommand rewrite Remove ~350 lines of heredoc/comment/arithmetic parsing from splitCompoundCommand that were not needed to fix #2846. Revert to the original main version, keeping only the core env-var stripping logic in matchesCommandPattern and getCommandRoot. This addresses both reviewer concerns: - heredoc breakage: no longer an issue since splitCompoundCommand is unchanged - Windows quoted paths: handled correctly by shell-quote parse in getCommandRoot --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> |
||
|---|---|---|
| .. | ||
| channels | ||
| cli | ||
| core | ||
| sdk-java | ||
| sdk-typescript | ||
| test-utils | ||
| vscode-ide-companion | ||
| web-templates | ||
| webui | ||
| zed-extension | ||