From 0ef92677544ac25fe45fea0831ea5e0f0f7cd832 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Wed, 31 Jan 2024 16:12:00 +0100 Subject: [PATCH] fix: whonix uwt wrapper messes with git existence --- files/sh/.config/sh/shrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/sh/.config/sh/shrc b/files/sh/.config/sh/shrc index ed0d37c..d48a68f 100644 --- a/files/sh/.config/sh/shrc +++ b/files/sh/.config/sh/shrc @@ -205,6 +205,10 @@ _get_prompt_time(){ _git_prompt_info(){ has git || return + ## Whonix UWT wrapper circumvents the command existence check. + if test -f /usr/share/whonix/marker; then + git -v >/dev/null 2>&1 || return + fi ref="$(git symbolic-ref HEAD 2>/dev/null | cut -d '/' -f3)" test "${ref-}" || ref="$(git describe --tags --exact-match HEAD 2>/dev/null)" test "${ref-}" || ref="$(git rev-parse HEAD 2>/dev/null | head -c 7)"