Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

[Bugfix] prompt_rbenv fails if specified local ruby version is not present #1197

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion powerlevel9k.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ prompt_rbenv() {
if [[ -n "$RBENV_VERSION" ]]; then
"$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$RBENV_VERSION" 'RUBY_ICON'
elif [ $commands[rbenv] ]; then
local rbenv_version_name="$(rbenv version-name)"
local rbenv_version_name="$(rbenv version-name 2>/dev/null || echo "$(print_icon FAIL_ICON) $(rbenv local 2>/dev/null)")"
local rbenv_global="$(rbenv global)"
if [[ "${rbenv_version_name}" != "${rbenv_global}" || "${POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW}" == "true" ]]; then
"$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
Expand Down