From 1aba28d97b770b2811e57051043ff3d9ecdd88d8 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 31 Jan 2026 16:55:44 +0800 Subject: [PATCH] fix: symlink resolution --- nix-js/src/runtime.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nix-js/src/runtime.rs b/nix-js/src/runtime.rs index 23d3741..81dfe4d 100644 --- a/nix-js/src/runtime.rs +++ b/nix-js/src/runtime.rs @@ -133,9 +133,11 @@ fn op_import( let current_dir = ctx.get_current_dir(); let mut absolute_path = current_dir - .join(&path) - .canonicalize() - .map_err(|e| format!("Failed to resolve path {}: {}", path, e))?; + .join(&path); + // Do NOT resolve symlinks (eval-okay-symlink-resolution) + // TODO: is this correct? + // .canonicalize() + // .map_err(|e| format!("Failed to resolve path {}: {}", path, e))?; if absolute_path.is_dir() { absolute_path.push("default.nix") }