Skip to content

Commit

Permalink
lib/theme: handle undefined parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelicWizard committed Feb 12, 2022
1 parent 6cd5409 commit 377f92b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions themes/githelpers.theme.bash
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function _git-remote-info {
elif [[ ${same_branch_name} != "true" ]]; then
remote_info="${VCS_STATUS_REMOTE_BRANCH}"
fi
if [[ -n "${remote_info}" ]];then
if [[ -n "${remote_info:-}" ]];then
# no support for gone remote branches in gitstatusd
local branch_prefix="${SCM_THEME_BRANCH_TRACK_PREFIX}"
echo "${branch_prefix}${remote_info}"
Expand All @@ -155,7 +155,7 @@ function _git-remote-info {
elif [[ ${same_branch_name} != "true" ]]; then
remote_info="\$(_git-upstream-branch)"
fi
if [[ -n "${remote_info}" ]];then
if [[ -n "${remote_info:-}" ]];then
local branch_prefix
if _git-upstream-branch-gone; then
branch_prefix="${SCM_THEME_BRANCH_GONE_PREFIX}"
Expand Down

0 comments on commit 377f92b

Please sign in to comment.