Project
cortex
Description
When ripgrep is not installed, cortex debug ripgrep displays manual install hints. The Linux hint says apt install ripgrep (without sudo). However, the actual --install implementation runs sudo apt install -y ripgrep (with sudo and -y). A user who copies the displayed hint will get a permission error. Conversely, the --install flag silently escalates to sudo without informing the user.
Error Message
Debug Logs
System Information
Screenshots
https://github.com/kiannidev/screens/blob/main/53e226a658e22031a734cdbc2cd1787d.png
Steps to Reproduce
When ripgrep is not installed:
Run cortex debug ripgrep
Expected Behavior
The install hint should match the actual install command, e.g. sudo apt install ripgrep.
Actual Behavior
To install ripgrep:
macOS: brew install ripgrep
Linux: apt install ripgrep / dnf install ripgrep
Windows: winget install BurntSushi.ripgrep.MSVC
The hint says apt install ripgrep (no sudo), but the --install code runs sudo apt install -y ripgrep.
Additional Context
Code Location:
src/cortex-cli/src/debug_cmd/handlers/ripgrep.rs:
- Line 130 (hint): println!(" Linux: apt install ripgrep / dnf install ripgrep");
- Lines 179–180 (actual): Command::new("sudo").args(["apt", "install", "-y", "ripgrep"])
Project
cortex
Description
When ripgrep is not installed, cortex debug ripgrep displays manual install hints. The Linux hint says apt install ripgrep (without sudo). However, the actual --install implementation runs sudo apt install -y ripgrep (with sudo and -y). A user who copies the displayed hint will get a permission error. Conversely, the --install flag silently escalates to sudo without informing the user.
Error Message
Debug Logs
System Information
Screenshots
https://github.com/kiannidev/screens/blob/main/53e226a658e22031a734cdbc2cd1787d.png
Steps to Reproduce
When ripgrep is not installed:
Run cortex debug ripgrep
Expected Behavior
The install hint should match the actual install command, e.g. sudo apt install ripgrep.
Actual Behavior
To install ripgrep:
macOS: brew install ripgrep
Linux: apt install ripgrep / dnf install ripgrep
Windows: winget install BurntSushi.ripgrep.MSVC
The hint says apt install ripgrep (no sudo), but the --install code runs sudo apt install -y ripgrep.
Additional Context
Code Location:
src/cortex-cli/src/debug_cmd/handlers/ripgrep.rs: