From e463cccafd23f090bc58aaf1de3d9904ea333089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=E1=BA=A3i?= Date: Thu, 2 Nov 2023 23:05:42 +0700 Subject: [PATCH] docs: note about hardlink nuance for future impl (#175) --- pacquet/crates/package-manager/src/link_file.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pacquet/crates/package-manager/src/link_file.rs b/pacquet/crates/package-manager/src/link_file.rs index 6805515c20..f36f6d41c8 100644 --- a/pacquet/crates/package-manager/src/link_file.rs +++ b/pacquet/crates/package-manager/src/link_file.rs @@ -39,13 +39,16 @@ pub fn link_file(source_file: &Path, target_link: &Path) -> Result<(), LinkFileE })?; } + // TODO: add hardlink (https://github.com/pnpm/pacquet/issues/174) + // NOTE: do not hardlink packages with postinstall + reflink_copy::reflink_or_copy(source_file, target_link).map_err(|error| { LinkFileError::CreateLink { from: source_file.to_path_buf(), to: target_link.to_path_buf(), error, } - })?; // TODO: add hardlink + })?; Ok(()) }