diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/profile.eselect | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/profile.eselect b/modules/profile.eselect index 3b87441..f33f8d1 100644 --- a/modules/profile.eselect +++ b/modules/profile.eselect @@ -1,5 +1,5 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 2005-2020 Gentoo Authors +# Copyright 2005-2022 Gentoo Authors # Distributed under the terms of the GNU GPL version 2 or later # This is a portage-only module. @@ -137,7 +137,8 @@ set_symlink() { "${MAKE_PROFILE}" \ || die -q "Couldn't set new ${MAKE_PROFILE} symlink" # check if the resulting symlink is sane - [[ $(canonicalise "${MAKE_PROFILE}") != "$(canonicalise "${EROOT}")"/* ]] \ + local eroot=$(canonicalise "${EROOT:-/}") + [[ $(canonicalise "${MAKE_PROFILE}") != "${eroot%/}"/* ]] \ && [[ -z ${force} ]] \ && write_warning_msg "Strange path. Check ${MAKE_PROFILE} symlink" |