fix: symlink resolution

This commit is contained in:
2026-01-31 16:55:44 +08:00
parent 6838f9a0cf
commit 1aba28d97b

View File

@@ -133,9 +133,11 @@ fn op_import<Ctx: RuntimeContext>(
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")
}