summaryrefslogtreecommitdiff
path: root/pre-commit.d/30store-metadata
diff options
context:
space:
mode:
Diffstat (limited to 'pre-commit.d/30store-metadata')
-rwxr-xr-xpre-commit.d/30store-metadata2
1 files changed, 1 insertions, 1 deletions
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index 0416ec6..f4125f6 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -73,7 +73,7 @@ generate_metadata() {
fi
# Find all files and directories that don't have the current user as the owner
- find $NOVCS \! -user "$USER" -exec stat --format="maybe chown %U '{}'" {} \; \
+ find $NOVCS \! -user "$(id -u)" -exec stat --format="maybe chown %U '{}'" {} \; \
| sort | filter_unknown 'maybe chown' owner
# Find all files and directories that don't have root as the group
find $NOVCS \! -group $(id -g) -exec stat --format="maybe chgrp %G '{}'" {} \; \