1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-16 07:13:53 -05:00

error message when rehash fails on non-writable directory

Fixes #238
This commit is contained in:
Mislav Marohnić
2013-03-07 00:13:50 -05:00
parent 0d1f1d09f0
commit 1fe59e41ea
2 changed files with 38 additions and 1 deletions

View File

@@ -17,7 +17,11 @@ mkdir -p "$SHIM_PATH"
set -o noclobber
{ echo > "$PROTOTYPE_SHIM_PATH"
} 2>/dev/null ||
{ echo "rbenv: cannot rehash: $PROTOTYPE_SHIM_PATH exists"
{ if [ -w "$SHIM_PATH" ]; then
echo "rbenv: cannot rehash: $PROTOTYPE_SHIM_PATH exists"
else
echo "rbenv: cannot rehash: $SHIM_PATH isn't writable"
fi
exit 1
} >&2
set +o noclobber