summaryrefslogtreecommitdiff
path: root/pre-commit.d/30store-metadata
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-16 15:40:40 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-16 15:40:40 -0500
commitc365e1e5ce9d76930964285423f4f387b2977f01 (patch)
treecd46c003fca4ef5fb978ac4918ea8ac80346855c /pre-commit.d/30store-metadata
parent95c17ebcf75b29580ffab531edccd0ab862b865e (diff)
Avoid relying on USER being set, won't be for cron job. Closes: #515602
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 '{}'" {} \; \