mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Replace spawn with execFile for memory-safe command execution (#1068)
This commit is contained in:
@@ -67,11 +67,15 @@ const ripgrepAvailabilityCheck: WarningCheck = {
|
||||
return null;
|
||||
}
|
||||
|
||||
const isAvailable = await canUseRipgrep(options.useBuiltinRipgrep);
|
||||
if (!isAvailable) {
|
||||
return 'Ripgrep not available: Please install ripgrep globally to enable faster file content search. Falling back to built-in grep.';
|
||||
try {
|
||||
const isAvailable = await canUseRipgrep(options.useBuiltinRipgrep);
|
||||
if (!isAvailable) {
|
||||
return 'Ripgrep not available: Please install ripgrep globally to enable faster file content search. Falling back to built-in grep.';
|
||||
}
|
||||
return null;
|
||||
} catch (error) {
|
||||
return `Ripgrep not available: ${error instanceof Error ? error.message : 'Unknown error'}. Falling back to built-in grep.`;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user