From ef78cae6a40ea148c0fe26964bec15cd0ea6f6f1 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 30 Apr 2019 07:52:44 -0500 Subject: [PATCH] files: fix `find` invocation broken in c94eaa0e Add parens to expression so the `-exec` includes files matching both. Otherwise (before this change) the `-exec` is only invoked for links (`-type l`): file or (link -> doexec) => (file or link) -> doexec (cherry picked from commit f56256f4883f941028a7f08ecaae939232406c65) --- modules/files.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/files.nix b/modules/files.nix index 46e796ed..0e8297f7 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -74,7 +74,7 @@ in function checkNewGenCollision() { local newGenFiles newGenFiles="$(readlink -e "$newGenPath/home-files")" - find "$newGenFiles" -type f -or -type l \ + find "$newGenFiles" \( -type f -or -type l \) \ -exec bash ${check} "$newGenFiles" {} + } @@ -155,7 +155,7 @@ in local newGenFiles newGenFiles="$(readlink -e "$newGenPath/home-files")" - find "$newGenFiles" -type f -or -type l \ + find "$newGenFiles" \( -type f -or -type l \) \ -exec bash ${link} "$newGenFiles" {} + }