lib/theme: handle undefined parameter

pull/2061/head
John D Pell 2022-02-02 12:54:00 -08:00
parent 95353f1a98
commit 2cea663a4a
1 changed files with 2 additions and 2 deletions

View File

@ -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}"
@ -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}"