From ac20054bbf29c2191cd8cd0d30ed2771c7c2265d Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 24 Aug 2019 16:15:30 +0400 Subject: [PATCH] fix tag release when empty --- bash.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash.bashrc b/bash.bashrc index 25db624..8ac76a9 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -109,7 +109,7 @@ __prompt_command() { if [[ $ahead -ne 0 ]]; then PS1+="${Blu}↑${ahead}" else - tag_release=`git describe --exact-match --tags $(git log -n1 --pretty='%h')` + tag_release=`git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null` if [[ -z $tag_release ]];then PS1+="${Red}✔" else