From db324f54eb67951c3c4a0d219f9aeb0f5e8d3410 Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Wed, 24 Aug 2022 22:41:12 +0800
Subject: [PATCH] chore: update auto launch

---
 src-tauri/Cargo.lock         | 5 +++--
 src-tauri/Cargo.toml         | 2 +-
 src-tauri/src/core/sysopt.rs | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 926a968..9090bd1 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -238,10 +238,11 @@ dependencies = [
 
 [[package]]
 name = "auto-launch"
-version = "0.2.0"
+version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f0ab475f9b1049a9d4e9c83f45ff27ec3bce4a6cb8e58e7f29030f8992af8c5"
+checksum = "642d13324da4df30a472026356a7fd24845d4a8038e5c47ed99c62074b526fa5"
 dependencies = [
+ "anyhow",
  "dirs 4.0.0",
  "winreg",
 ]
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index e738024..bdf0d7e 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -25,7 +25,7 @@ nanoid = "0.4.0"
 chrono = "0.4.19"
 serde_json = "1.0"
 serde_yaml = "0.8"
-auto-launch = "0.2"
+auto-launch = "0.3"
 port_scanner = "0.1.5"
 delay_timer = "0.11.1"
 parking_lot = "0.12.0"
diff --git a/src-tauri/src/core/sysopt.rs b/src-tauri/src/core/sysopt.rs
index b872956..f52de55 100644
--- a/src-tauri/src/core/sysopt.rs
+++ b/src-tauri/src/core/sysopt.rs
@@ -123,7 +123,7 @@ impl Sysopt {
     let auto = AutoLaunchBuilder::new()
       .set_app_name(app_name)
       .set_app_path(app_path)
-      .build();
+      .build()?;
 
     if let Some(enable) = enable {
       // fix issue #26
-- 
GitLab