代码拉取完成,页面将自动刷新
# Usage: rbenv global [<version>]
# Summary: Set or show the global Ruby version
param($cmd)
function get_global_version() {
# common.d will ensure a global.txt (but empty)
$cont = Get-Content $GLOBAL_VERSION_FILE
if (!$cont) {
warn "rbenv: No global version has been set, use rbenv global <version>"
} else {
$cont
}
}
function set_global_version($version) {
$version = auto_fix_version_for_installed $version
$version | Out-File $GLOBAL_VERSION_FILE -NoNewline -Encoding ascii
success "rbenv: Change to global version '$version'"
# <2023-05-05> Although I've fixed the bug of bundler process to successfully trigger
# the post-install hook in the share/rubygems_plugins.rb
# And then, `rbenv rehash` after a `rbenv global` is no longer needed.
#
# But I think it now can be a second safeguard to ensure all gems' executables are there
# in the shims dir. So I keep this statement.
rbenv rehash version $version
}
if (! $cmd) {
get_global_version
} else {
set_global_version $cmd
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。