Skip to content

Commit

Permalink
kiss-size: fix for packages containing files with quotes in filenames
Browse files Browse the repository at this point in the history
if a package contains a file with a quote in it's name, xargs complains
about an unmatched quote and fails, and the pipeline is aborted.
this patch escapes all non-alphanumeric characters so that xargs can
handle such filenames.
  • Loading branch information
aabacchus authored and git-bruh committed Aug 5, 2022
1 parent 990eba3 commit a973491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/kiss-size
Expand Up @@ -29,7 +29,7 @@ kiss list "${1:-null}" >/dev/null || {
# Directories in the manifest end in a trailing '/'.
# Send the file list to 'xargs' to run through 'du',
# this prevents du from exiting due to too many arguments
sed -e "s|^|$KISS_ROOT|" -e 's|.*/$||' \
sed -e "s|^|$KISS_ROOT|" -e '/.*\/$/d' -e 's/[^[:alnum:]]/\\&/g' \
"$KISS_ROOT/var/db/kiss/installed/$1/manifest" \
| xargs du -sk -- 2>/dev/null |

Expand Down

0 comments on commit a973491

Please sign in to comment.