aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2012-05-09 18:51:32 +0200
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2012-05-09 18:55:30 +0200
commit9d54f152203b16736f6df482a8ddc248ea59e310 (patch)
tree50242632291c2cbab0eebe1f488ac6b439db1ca9
parenta3fec0e99a9e429ea24feff5cfa52c683dc51015 (diff)
downloadpaludis-9d54f152203b16736f6df482a8ddc248ea59e310.tar.gz
paludis-9d54f152203b16736f6df482a8ddc248ea59e310.tar.xz
Check readable for improved error message.
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 8f40fb8..e0b67ef 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -374,7 +374,10 @@ ebuild_load_ebuild()
eval paludis_saved_${paludis_v}='${!paludis_v}'
done
- [[ -f ${1} ]] || die "Ebuild '${1}' is not a file"
+ if [[ ! -f ${1} ]]; then
+ [[ -r ${1} ]] || die "Ebuild '${1}' cannot be read"
+ die "Ebuild '${1}' is not a file"
+ fi
source ${1} || die "Error sourcing ebuild '${1}'"
# we may or may not use this later