From b3512f494e820cffe2b8c74d4d03dc1cbb0cd718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Tue, 28 Oct 2014 15:24:39 +0100 Subject: [PATCH] Avoid endless recursion when rbx is installed over existing one When installing rbx over an existing location, the `gems/bin` directory will already be a symlink to `bin/` and an attempt to recreate this will end up in recursion that keeps growing a binstub file until the disk is full. --- bin/ruby-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ruby-build b/bin/ruby-build index 94029023..1332ba6d 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -644,7 +644,7 @@ fix_rbx_gem_binstubs() { local bindir="${prefix}/bin" local file binstub # Symlink Rubinius' `gems/bin/` into `bin/` - if [ -d "$gemdir" ]; then + if [ -d "$gemdir" ] && [ ! -L "$gemdir" ]; then for file in "$gemdir"/*; do binstub="${bindir}/${file##*/}" rm -f "$binstub"