Skip to content

Commit e1b50e6

Browse files
committed
Ensure installed directories are not world-writable to avoid Bundler warnings
1 parent 7b4ee4c commit e1b50e6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/ruby-build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ install_package() {
4444
cd "$package_name"
4545
build_package "$package_name" $*
4646
after_install_package "$package_name"
47+
fix_directory_permissions
4748
cd "$cwd"
4849

4950
echo "Installed ${package_name} to ${PREFIX_PATH}" >&2
@@ -114,6 +115,11 @@ after_install_package() {
114115
local stub=1
115116
}
116117

118+
fix_directory_permissions() {
119+
# Ensure installed directories are not world-writable to avoid Bundler warnings
120+
find "$PREFIX_PATH" -type d -exec chmod go-w {} \;
121+
}
122+
117123
use_gcc42_on_lion() {
118124
if [ "$(uname -s)" = "Darwin" ]; then
119125
if [ "$(expr "$(sw_vers -productVersion | cut -f 2 -d .)" \>= 7 || true)" -eq 1 ]; then

0 commit comments

Comments
 (0)