Skip to content

Commit 1aef8e6

Browse files
committed
warn user that installation will fail if she doesn't have necessary write permission
1 parent 61a627e commit 1aef8e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/ruby-install

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ fi
1818

1919
init || exit $?
2020

21+
if [[ -w "$install_dir" ]]; then
22+
error "seems you don't have necessary write permission on \"$install_dir\""
23+
exit 1
24+
fi
25+
2126
if [[ $no_reinstall -eq 1 ]] && [[ -x "$install_dir/bin/ruby" ]]; then
2227
log "Ruby is already installed into $install_dir"
2328
exit

0 commit comments

Comments
 (0)