fixed home detection

master
plazmoid 3 years ago
parent cfcbf638d6
commit e989713ed4
  1. 4
      src/main.rs

@ -18,7 +18,7 @@ mod ssh_config;
use ssh_config::TinySSHConfig; use ssh_config::TinySSHConfig;
const HOST: &str = "aws-tun"; const HOST: &str = "aws-tun";
const BASE_CONFIG: &str = "/home/plazmoid/.ssh/config"; const BASE_CONFIG: &str = concat!(env!("HOME"), "/.ssh/config");
static mut DAEMONIZED: bool = false; static mut DAEMONIZED: bool = false;
@ -248,10 +248,12 @@ fn monitor_process() -> ! {
} }
fn main() { fn main() {
if !cfg!(debug_assertions) {
panic::set_hook(Box::new(|info| { panic::set_hook(Box::new(|info| {
notify(info.to_string(), true); notify(info.to_string(), true);
exit(1); exit(1);
})); }));
}
let mut args = env::args(); let mut args = env::args();
if let Some(arg) = args.nth(1) { if let Some(arg) = args.nth(1) {
if arg == "-d" { if arg == "-d" {

Loading…
Cancel
Save