summaryrefslogtreecommitdiff
path: root/abuild-sudo.c
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-04-13 00:26:35 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-04-14 11:52:36 +0000
commit5487632f300d7109c47b1021d57f02e269ed17e8 (patch)
tree404f532bf600b69c3d04b4dd6cc393e7340b26f2 /abuild-sudo.c
parentd413730550eb1d6fa28be5b48778f156c504d75d (diff)
downloadabuild-5487632f300d7109c47b1021d57f02e269ed17e8.tar.gz
abuild-5487632f300d7109c47b1021d57f02e269ed17e8.tar.bz2
abuild-5487632f300d7109c47b1021d57f02e269ed17e8.tar.xz
abuild-5487632f300d7109c47b1021d57f02e269ed17e8.zip
abuild-sudo: make error msg "Not a member of group abuild" more clear
Few days ago some user on IRC pointed out that the current error message: abuild-apk: Not a member of group abuild is confusing. He was trying to build a package using abuild -r and didn't know what this message means. fixes #5408
Diffstat (limited to 'abuild-sudo.c')
-rw-r--r--abuild-sudo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/abuild-sudo.c b/abuild-sudo.c
index f3479fc..f0c074e 100644
--- a/abuild-sudo.c
+++ b/abuild-sudo.c
@@ -74,8 +74,10 @@ int main(int argc, const char *argv[])
if (grent == NULL)
errx(1, "%s: Group not found", ABUILD_GROUP);
- if (!is_in_group(grent->gr_gid))
- errx(1, "Not a member of group %s\n", ABUILD_GROUP);
+ if (!is_in_group(grent->gr_gid)) {
+ errx(1, "User %s is not a member of group %s\n",
+ getlogin(), ABUILD_GROUP);
+ }
cmd = strrchr(argv[0], '-');
if (cmd == NULL)