From c3b80fdd9bde6b2c2cd312a0749c24926ef54699 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Wed, 11 May 2016 14:24:47 -0500 Subject: Canonicalize $KERL_BASE_DIR --- kerl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kerl b/kerl index 154ec2a..8ee95ca 100755 --- a/kerl +++ b/kerl @@ -830,6 +830,7 @@ is_valid_install_path() candidate=$(realpath "$1") canonical_home=$(realpath "$HOME") + canonical_base_dir=$(realpath "$KERL_BASE_DIR") # don't allow installs into home directory if [ "$candidate" = "$canonical_home" ]; then @@ -837,9 +838,9 @@ is_valid_install_path() return 1 fi - # don't install into .kerl either. - if [ "$candidate" = "$canonical_home/.kerl" ]; then - echo "ERROR: You cannot install a build into $HOME/.kerl." + # don't install into our base directory either. + if [ "$candidate" = "$canonical_base_dir" ]; then + echo "ERROR: You cannot install a build into $KERL_BASE_DIR." return 1 fi -- cgit v1.2.3