修复已知问题
This commit is contained in:
@@ -146,9 +146,6 @@ fn main() {
|
|||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = BaseArgs::parse();
|
|
||||||
match args.command {
|
|
||||||
Commands::Start(_) | Commands::Stop => {
|
|
||||||
if sudo::RunningAs::Root != sudo::check() {
|
if sudo::RunningAs::Root != sudo::check() {
|
||||||
println!(
|
println!(
|
||||||
"{}",
|
"{}",
|
||||||
@@ -156,6 +153,7 @@ fn main() {
|
|||||||
);
|
);
|
||||||
sudo::escalate_if_needed().unwrap();
|
sudo::escalate_if_needed().unwrap();
|
||||||
}
|
}
|
||||||
|
let args = BaseArgs::parse();
|
||||||
let home = dirs::home_dir().unwrap().join(".switch_desktop");
|
let home = dirs::home_dir().unwrap().join(".switch_desktop");
|
||||||
config::set_home(home);
|
config::set_home(home);
|
||||||
if let Commands::Start(start_args) = &args.command {
|
if let Commands::Start(start_args) = &args.command {
|
||||||
@@ -163,9 +161,6 @@ fn main() {
|
|||||||
let _ = log_init();
|
let _ = log_init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
unix::main0(args);
|
unix::main0(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user