From fd4634e2e259e730f1828737d306d95ae148e4b3 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Thu, 6 Jan 2022 10:26:24 +1100 Subject: strip: rollback simplification Fails sometimes when output is not a directory. This patch reverts to the previous implementation, but also patches in a fix for file names containing spaces. --- default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 3ec0450..1c550b8 100644 --- a/default.nix +++ b/default.nix @@ -151,7 +151,11 @@ let stripCommand = '' function rewriteOutput { - find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths + if [ -f ''${!1} ] ; then + strip-store-paths ''${!1} + else + find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths + fi } for o in $outputs ; do rewriteOutput $o -- cgit v1.2.3