From 6ea379dbf3aad696f3aab3a145a877c4986e64e3 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 24 Nov 2026 04:52:13 +0000 Subject: populate symlink: replace a directory at the target path ln -f replaces files and links, but not directories, so a symlink source failed where a directory was, e.g. the Git work tree of a source that had another type: "cannot overwrite directory". The symlink script removes what isn't a link first, with remove_tree, which also copes with directories that aren't writable. --- pkgs/populate/src/populate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/populate/src/populate.rs') diff --git a/pkgs/populate/src/populate.rs b/pkgs/populate/src/populate.rs index 1aaf064..0659fe7 100644 --- a/pkgs/populate/src/populate.rs +++ b/pkgs/populate/src/populate.rs @@ -489,7 +489,7 @@ struct Symlink; impl Kind for Symlink { fn deliver(&self, d: &Delivery) -> Result { let target = d.string("target")?; - let output = d.context.output(sh::SYMLINK, &[d.path, target])?; + let output = d.context.output(&sh::symlink(), &[d.path, target])?; Ok(Outcome::changed(output.contains("changed")).with("target", target)) } } -- cgit v1.3.1