From e409b61f4c650b5ce556cd69c7bbe23257105376 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 30 Jul 2018 09:11:19 -0400 Subject: [PATCH] Add more information in errors about missing uidimappings or gidmappings Need to tell users about the files that the mappings are missing in. No subuid ranges found for user "dwalsh" in /etc/subuid Signed-off-by: Daniel J Walsh --- pkg/idtools/idtools.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/idtools/idtools.go b/pkg/idtools/idtools.go index 68a072db22..9c591aff83 100644 --- a/pkg/idtools/idtools.go +++ b/pkg/idtools/idtools.go @@ -140,10 +140,10 @@ func NewIDMappings(username, groupname string) (*IDMappings, error) { return nil, err } if len(subuidRanges) == 0 { - return nil, fmt.Errorf("No subuid ranges found for user %q", username) + return nil, fmt.Errorf("No subuid ranges found for user %q in %s", username, subuidFileName) } if len(subgidRanges) == 0 { - return nil, fmt.Errorf("No subgid ranges found for group %q", groupname) + return nil, fmt.Errorf("No subgid ranges found for group %q in %s", groupname, subgidFileName) } return &IDMappings{