mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-01 16:59:21 +00:00
fix(gui): set HOME for macOS launchd service (#2509)
Co-authored-by: hezz <hezz@example.com>
This commit is contained in:
@@ -3227,6 +3227,7 @@ async fn main() -> Result<(), Error> {
|
||||
program: bin_path,
|
||||
args: bin_args,
|
||||
work_directory: work_dir,
|
||||
environment: None,
|
||||
disable_autostart: install_args.disable_autostart.unwrap_or(false),
|
||||
description: Some(install_args.description),
|
||||
display_name: install_args.display_name,
|
||||
|
||||
@@ -11,6 +11,7 @@ pub struct ServiceInstallOptions {
|
||||
pub program: PathBuf,
|
||||
pub args: Vec<OsString>,
|
||||
pub work_directory: PathBuf,
|
||||
pub environment: Option<Vec<(String, String)>>,
|
||||
pub disable_autostart: bool,
|
||||
pub description: Option<String>,
|
||||
pub display_name: Option<String>,
|
||||
@@ -92,7 +93,7 @@ impl Service {
|
||||
autostart: !options.disable_autostart,
|
||||
username: None,
|
||||
working_directory: Some(options.work_directory.clone()),
|
||||
environment: None,
|
||||
environment: options.environment.clone(),
|
||||
disable_restart_on_failure: options.disable_restart_on_failure,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user