Disallow running CLI with root privileges (#32583)
In #31331, I made a change that prevents Zed from running with root privileges, but I forgot about the CLI. So if you run the CLI without the `--foreground` flag, it just freezes without any messages. This PR fixes that. Release Notes: - N/A
This commit is contained in:
parent
3fb28f695f
commit
628f91dd96
6 changed files with 29 additions and 17 deletions
|
@ -127,6 +127,9 @@ fn parse_path_with_position(argument_str: &str) -> anyhow::Result<String> {
|
|||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
#[cfg(unix)]
|
||||
util::prevent_root_execution();
|
||||
|
||||
// Exit flatpak sandbox if needed
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue