Skip to content

Commit

Permalink
omb-prompt-base: do not attempt to process git vars outside a git tree
Browse files Browse the repository at this point in the history
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
  • Loading branch information
jjmcdn authored and akinomyoga committed May 23, 2023
1 parent dd7807f commit a9cd9f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/omb-prompt-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ function git_status_summary {
function git_prompt_vars {
local details=''
local git_status_flags=''
[[ "$(command git rev-parse --is-inside-work-tree 2> /dev/null)" == "true" ]] || return 1
SCM_STATE=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
if [[ "$(command git config --get bash-it.hide-status)" != "1" ]]; then
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && git_status_flags='-uno'
Expand Down

0 comments on commit a9cd9f1

Please sign in to comment.