Abort early if TMPDIR is non-writable or non-executable

Fixes #148
This commit is contained in:
Mislav Marohnić 2013-10-28 00:44:15 +01:00
parent 1173e8c095
commit d9cd8a1ae3
2 changed files with 23 additions and 0 deletions

View file

@ -841,6 +841,11 @@ else
TMP="${TMPDIR%/}"
fi
if [ ! -w "$TMP" ] || [ ! -x "$TMP" ]; then
echo "ruby-build: TMPDIR=$TMP is set to a non-accessible location" >&2
exit 1
fi
# Work around warnings building Ruby 2.0 on Clang 2.x:
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
#