From 2cea663a4a51f20599dccf7e1ff9e8c2473584ec Mon Sep 17 00:00:00 2001 From: John D Pell Date: Wed, 2 Feb 2022 12:54:00 -0800 Subject: [PATCH] lib/theme: handle undefined parameter --- themes/githelpers.theme.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/githelpers.theme.bash b/themes/githelpers.theme.bash index ba089392..5ef18e9a 100644 --- a/themes/githelpers.theme.bash +++ b/themes/githelpers.theme.bash @@ -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}"