From 76081f8d89090cb714af48cbf5c5a498c8916aec Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Mon, 31 Jan 2022 23:32:41 +0800
Subject: [PATCH] fix: macos auto launch fail

---
 src-tauri/src/core/verge.rs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src-tauri/src/core/verge.rs b/src-tauri/src/core/verge.rs
index c75d406..0cf2d82 100644
--- a/src-tauri/src/core/verge.rs
+++ b/src-tauri/src/core/verge.rs
@@ -157,7 +157,10 @@ impl Verge {
 
     match result {
       Ok(_) => Ok(()),
-      Err(_) => Err("failed to set system startup info".into()),
+      Err(err) => {
+        log::error!("{err}");
+        Err("failed to set system startup info".into())
+      }
     }
   }
 
@@ -227,7 +230,7 @@ fn get_app_path(app_name: &str) -> String {
   #[cfg(target_os = "linux")]
   let ext = "";
   #[cfg(target_os = "macos")]
-  let ext = ".app";
+  let ext = "";
   #[cfg(target_os = "windows")]
   let ext = ".exe";
   String::from(app_name) + ext
-- 
GitLab