diff options
author | Justin Bedo <cu@cua0.org> | 2022-01-05 13:09:53 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2022-01-05 13:09:53 +1100 |
commit | 54e45e125435b4a4c133547b7ee9b3c8667ef7dc (patch) | |
tree | 2aea612ec312f20a17106260ccad9b1e74760f4e /default.nix | |
parent | 0a637afd8bc82d03e474295895251aa47323d747 (diff) |
fix bug in strip-store-paths
also taking the opportunity to simplify the rewriteOutput
function and handle filenames with spaces
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 8 |
1 files changed, 1 insertions, 7 deletions
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 |