Permalink
Browse files

Merge branch 'hotfix/1.11.1'

  • Loading branch information...
2 parents ebf0730 + 8c7ad0a commit 97bfd71f88582629a32ffd1a63ca1ac079f8ae0b @mpapis mpapis committed Mar 23, 2012
Showing with 12 additions and 3 deletions.
  1. +10 −2 scripts/gemsets
  2. +1 −1 scripts/initialize
  3. +1 −0 scripts/selector
View
@@ -167,13 +167,13 @@ gemset_create()
if [[ "$gemset" == *"${rvm_gemset_separator:-"@"}"* ]]
then
rvm_error "Can not create gemset '$gemset', it contains a \"${rvm_gemset_separator:-"@"}\"."
- continue
+ return 2
fi
if [[ -z "$gemset" || "$gemset" == *"${rvm_gemset_separator:-"@"}" ]]
then
rvm_error "Can not create gemset '$gemset', Missing name. "
- continue
+ return 3
fi
gem_home="${prefix}${rvm_gemset_separator:-"@"}${gemset}"
@@ -183,6 +183,7 @@ gemset_create()
mkdir -p "$gem_home"
fi
+ : rvm_gems_cache_path:${rvm_gems_cache_path:=${rvm_gems_path:-"$rvm_path/gems"}/cache}
# When the globalcache is enabled, we need to ensure we setup the cache directory correctly.
if __rvm_using_gemset_globalcache
then
@@ -193,6 +194,13 @@ gemset_create()
fi
ln -fs "$rvm_gems_cache_path" "$gem_home/cache"
fi
+
+ if ! ( rvm_ruby_string="$(__rvm_env_string)${rvm_gemset_separator:-"@"}${gemset}" __rvm_use )
+ then
+ rvm_error "Can not create environment file for '$gemset', Could not use ruby. "
+ return 4
+ fi
+
rvm_log "'$gemset' gemset created ($gem_home)."
done
return 0
View
@@ -132,7 +132,7 @@ Error:
rvm_wrappers_path:${rvm_wrappers_path:="$rvm_path/wrappers"} \
rvm_verbose_flag:${rvm_verbose_flag:=0} \
rvm_debug_flag:${rvm_debug_flag:=0} \
- rvm_gems_cache_path:${rvm_gems_cache_path:="${rvm_gems_path:-"$rvm_path/gems"}/cache"}
+ rvm_gems_cache_path:${rvm_gems_cache_path:=${rvm_gems_path:-"$rvm_path/gems"}/cache}
export rvm_action rvm_alias_expanded rvm_archive_extension rvm_archives_path rvm_bin_flag rvm_bin_path rvm_configure_flags rvm_debug_flag rvm_default_flag rvm_delete_flag rvm_docs_path rvm_docs_type rvm_dump_environment_flag rvm_environments_path rvm_error_message rvm_examples_path rvm_expanding_aliases rvm_file_name rvm_gemdir_flag rvm_gems_cache_path rvm_gems_path rvm_gemset_name rvm_gemset_separator rvm_gemsets_path rvm_gemstone_package_file rvm_gemstone_url rvm_head_flag rvm_help_path rvm_hook rvm_hooks_path rvm_install_args rvm_install_on_use_flag rvm_lib_path rvm_llvm_flag rvm_loaded_flag rvm_log_path rvm_make_flags rvm_niceness rvm_nightly_flag rvm_only_path_flag rvm_parse_break rvm_patch_names rvm_patch_original_pwd rvm_patches_path rvm_path rvm_pretty_print_flag rvm_proxy rvm_quiet_flag rvm_ree_options rvm_reload_flag rvm_remove_flag rvm_repos_path rvm_rubies_path rvm_ruby_alias rvm_ruby_aliases rvm_ruby_args rvm_ruby_binary rvm_ruby_bits rvm_ruby_configure rvm_ruby_file rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_global_gems_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_load_path rvm_ruby_major_version rvm_ruby_make rvm_ruby_make_install rvm_ruby_minor_version rvm_ruby_mode rvm_ruby_name rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_patch rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_require rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_sha rvm_ruby_string rvm_ruby_strings rvm_ruby_tag rvm_ruby_url rvm_ruby_user_tag rvm_ruby_version rvm_script_name rvm_scripts_path rvm_sdk rvm_user_install_flag rvm_silent_flag rvm_src_path rvm_sticky_flag rvm_system_flag rvm_tmp_path rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_user_path rvm_usr_path rvm_verbose_flag rvm_wrapper_name rvm_wrappers_path rvm_ruby_repo_branch rvm_man_path rvm_architectures
View
@@ -1114,6 +1114,7 @@ __rvm_gemset_select()
then
if __rvm_using_gemset_globalcache && [[ ! -L "$rvm_ruby_gem_home/cache" ]]
then
+ : rvm_gems_cache_path:${rvm_gems_cache_path:=${rvm_gems_path:-"$rvm_path/gems"}/cache}
\mv "$rvm_ruby_gem_home/cache/"*.gem "$rvm_gems_cache_path/" 2>/dev/null
__rvm_rm_rf "$rvm_ruby_gem_home/cache"
\ln -fs "$rvm_gems_cache_path" "$rvm_ruby_gem_home/cache"

0 comments on commit 97bfd71

Please sign in to comment.