Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Apr 20, 2024
1 parent c0c7cde commit 8d99d70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ use nix::sched::{clone, unshare, CloneFlags};
use nix::sys::prctl::set_pdeathsig;
use nix::sys::signal::Signal;
use nix::sys::wait::{waitpid, WaitStatus};
use nix::unistd::{close, getgid, getpid, getuid, Gid, Pid, Uid};
use once_cell::sync::OnceCell;
use nix::unistd::{close, Gid, Uid};
use std::ffi::OsString;
use std::fs::OpenOptions;
use std::io::Write;

use std::path::Path;
use std::process::Command;
use std::time::SystemTime;
use std::{env, fs};
Expand Down Expand Up @@ -64,7 +61,10 @@ fn main() -> eyre::Result<()> {

let config = Config::build()?;

ensure!(!config.uid.is_root(), "hover-rs is not made to be run as root!");
ensure!(
!config.uid.is_root(),
"hover-rs is not made to be run as root!"
);

let (argv0, argv) = if args.command.is_empty() {
(env::var("SHELL").ok().unwrap_or(String::from("sh")), vec![])
Expand Down

0 comments on commit 8d99d70

Please sign in to comment.