#989201 "error: failed to get canonical path" is not informative enough

Package:
grub-common
Source:
grub2
Description:
GRand Unified Bootloader (common files)
Submitter:
Russell Coker
Date:
2021-05-28 09:51:04 UTC
Severity:
normal
Tags:
#989201#5
Date:
2021-05-28 09:47:30 UTC
From:
To:
root@xev:/# /usr/sbin/grub-probe --target=device /boot
/dev/sdh1
root@xev:/# chcon -t user_home_dir_t /boot
root@xev:/# /usr/sbin/grub-probe --target=device /boot
/usr/sbin/grub-probe: error: failed to get canonical path of `/boot'.

Above is an example of a permission error not being passed back to the user.
In the above example it should say "no permission to stat /boot" (or
something similar).  When googling this error I see cases where error
messages such as "%s is not a directory" or "directory %s does not exist"
would have allowed the user to solve their own problem without asking on
mailing lists or forums.