Browse files

improve reading ruby architecture, fallback to slow version, fix #1751

  • Loading branch information...
1 parent 3a8c62c commit 89c10931575775571578309c54f3673af73bd1c4 @mpapis mpapis committed Apr 7, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 scripts/list
View
8 scripts/list
@@ -69,15 +69,17 @@ list_detect_arch()
[[ -d "$rvm_gems_path/${__version}" && ! -d "$rvm_rubies_path/${__version%%@*}" ]]
then
__arch="no ruby"
- else
- __arch="broken"
+ elif
+ [[ -x "$rvm_rubies_path/${__version%%@*}/bin/ruby" ]]
+ then
+ __arch="$( __rvm_ruby_config_get "target_cpu" "$rvm_rubies_path/${__version%%@*}/bin/ruby" )"
fi
if
[[ -z "${__arch}" ]]
then
case "${__version}" in
(maglev-*|macruby-*) __arch="x86_64" ;;
- (*) __arch="unknown" ;;
+ (*) __arch="broken" ;;
esac
fi
}

0 comments on commit 89c1093

Please sign in to comment.