From 54e45e125435b4a4c133547b7ee9b3c8667ef7dc Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 5 Jan 2022 13:09:53 +1100 Subject: fix bug in strip-store-paths also taking the opportunity to simplify the rewriteOutput function and handle filenames with spaces --- default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 04fd62c..3ec0450 100644 --- a/default.nix +++ b/default.nix @@ -151,13 +151,7 @@ let stripCommand = '' function rewriteOutput { - if [ -f ''${!1} ] ; then - strip-store-paths ''${!1} - else - for f in $(find ''${!1} -type f) ; do - strip-store-paths $f - done - fi + find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths } for o in $outputs ; do rewriteOutput $o -- cgit v1.2.3