diff options
author | Mark Allen <[email protected]> | 2016-05-11 14:24:47 -0500 |
---|---|---|
committer | Mark Allen <[email protected]> | 2016-05-11 14:24:47 -0500 |
commit | c3b80fdd9bde6b2c2cd312a0749c24926ef54699 (patch) | |
tree | 55a1c100bde3786de50fd2aa1b857d35915d6fab | |
parent | 1f7543f617a592c639ea60f0226575dabc676f80 (diff) | |
download | kerl-c3b80fdd9bde6b2c2cd312a0749c24926ef54699.tar.gz kerl-c3b80fdd9bde6b2c2cd312a0749c24926ef54699.tar.bz2 kerl-c3b80fdd9bde6b2c2cd312a0749c24926ef54699.zip |
Canonicalize $KERL_BASE_DIR
-rwxr-xr-x | kerl | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |