From 07d4def3eff0b8ffb6b962859b61a3da62d124f0 Mon Sep 17 00:00:00 2001 From: Jonas Maier Date: Sun, 15 Mar 2026 21:00:25 +0100 Subject: redefining functions without cli error --- src/export_fun.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/export_fun.rs b/src/export_fun.rs index d8722b4..64810eb 100644 --- a/src/export_fun.rs +++ b/src/export_fun.rs @@ -355,7 +355,13 @@ fn create_function_hook_res( let sock_run = session.socket_running.as_ref().ok_or("no socket running")?; let exe_path = current_exe()?; let symlink_path = sock_run.bin_path.join(OsStr::from_bytes(fun_name)); - symlink(exe_path, symlink_path)?; + if let Err(e) = symlink(exe_path, symlink_path) { + match e.kind() { + // this is expected to happen when functions get redefined + io::ErrorKind::AlreadyExists => (), + _ => return Err(e)?, + } + } Ok(()) } -- cgit v1.2.3