mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-29 20:41:00 +02:00
parent
1173e8c095
commit
d9cd8a1ae3
2 changed files with 23 additions and 0 deletions
|
@ -841,6 +841,11 @@ else
|
||||||
TMP="${TMPDIR%/}"
|
TMP="${TMPDIR%/}"
|
||||||
fi
|
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:
|
# Work around warnings building Ruby 2.0 on Clang 2.x:
|
||||||
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
|
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
|
||||||
#
|
#
|
||||||
|
|
|
@ -234,3 +234,21 @@ rubinius-2.0.0: --prefix=$INSTALL_ROOT
|
||||||
bundle exec rake install
|
bundle exec rake install
|
||||||
OUT
|
OUT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "non-writable TMPDIR aborts build" {
|
||||||
|
export TMPDIR="${TMP}/build"
|
||||||
|
mkdir -p "$TMPDIR"
|
||||||
|
chmod -w "$TMPDIR"
|
||||||
|
|
||||||
|
run_inline_definition <<<""
|
||||||
|
assert_failure "ruby-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "non-executable TMPDIR aborts build" {
|
||||||
|
export TMPDIR="${TMP}/build"
|
||||||
|
mkdir -p "$TMPDIR"
|
||||||
|
chmod -x "$TMPDIR"
|
||||||
|
|
||||||
|
run_inline_definition <<<""
|
||||||
|
assert_failure "ruby-build: TMPDIR=$TMPDIR is set to a non-accessible location"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue