Skip to content

Commit

Permalink
Minor update to the no exec error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pkuczynski committed Feb 20, 2017
1 parent a6a8cb1 commit 1a51010
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions binscripts/rvm-installer
Expand Up @@ -787,24 +787,25 @@ rvm_install_validate_volume_mount_mode()

path=$rvm_path

# $rvm_path might not exists at this point so we need to traverse the directory tree upwards
# to find the name of the partition and then check if it has not been mount with noexec mode
# Directory $rvm_path might not exists at this point so we need to traverse the tree upwards
while [[ -n "$path" ]]
do
if [[ -d $path ]]
then
partition=`df -P $path | awk 'END{print $1}'`

test_exec=$(mktemp $path/rvm-exec-test.XXXXXX)
echo '#!/bin/sh' > "$test_exec"
chmod +x "$test_exec"
partition=`df -P $path | awk 'END{print $1}'`

if ! "$test_exec"
then
rm -f "$test_exec"
printf "%b" "
It looks that partition holding RVM destination location ${rvm_path}
is mounted in *noexec* mode, which prevents RVM from working correctly.
Please re-mount partition ${partition} without the noexec option."
It looks that scripts located in ${path}, which would be RVM destination ${rvm_path},
are not executable. One of the reasons might be that partition ${partition} holding this location
is mounted in *noexec* mode, which prevents RVM from working correctly. Please verify your setup
and re-mount partition ${partition} without the noexec option."
exit 2
fi

Expand Down

0 comments on commit 1a51010

Please sign in to comment.