aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2016-05-11 14:24:47 -0500
committerMark Allen <[email protected]>2016-05-11 14:24:47 -0500
commitc3b80fdd9bde6b2c2cd312a0749c24926ef54699 (patch)
tree55a1c100bde3786de50fd2aa1b857d35915d6fab
parent1f7543f617a592c639ea60f0226575dabc676f80 (diff)
downloadkerl-c3b80fdd9bde6b2c2cd312a0749c24926ef54699.tar.gz
kerl-c3b80fdd9bde6b2c2cd312a0749c24926ef54699.tar.bz2
kerl-c3b80fdd9bde6b2c2cd312a0749c24926ef54699.zip
Canonicalize $KERL_BASE_DIR
-rwxr-xr-xkerl7
1 files 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