From c365e1e5ce9d76930964285423f4f387b2977f01 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Feb 2009 15:40:40 -0500 Subject: Avoid relying on USER being set, won't be for cron job. Closes: #515602 --- pre-commit.d/30store-metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pre-commit.d/30store-metadata') 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 '{}'" {} \; \ -- cgit v1.2.3