fix: compile privileged VPN scripts on Unix

This commit is contained in:
Kevin Yue committed 2026-07-30 15:45:13 +08:00
1 parent fd9b48cd90
commit e066362c92
4 files changed
+7 -2

No files matched your search

@@ -5,7 +5,8 @@ use super::selection::{ScriptSource, select};
pub(crate) fn builder(server: &str, cookie: &str, args: &ConnectArgs) -> anyhow::Result<VpnBuilder> {
let installed = gpservice::vpnc_script::installed_script()?;
match select(installed.as_deref(), args.vpnc_script()) {
let legacy = args.vpnc_script();
match select(installed.as_deref(), legacy.as_deref()) {
ScriptSource::Installed(path) => {
Ok(Vpn::builder(server, cookie).script_path(Some(path.to_string_lossy().into_owned())))
}