From d1c4433ddac6c50f574cbc97eceeca7cd1973a18 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 24 Oct 2023 11:17:35 -0600 Subject: [PATCH] Don't run onefetch if you don't have it --- bash/prompt.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bash/prompt.sh b/bash/prompt.sh index b071c9b14..accc7f03d 100755 --- a/bash/prompt.sh +++ b/bash/prompt.sh @@ -12,7 +12,11 @@ fi # If directory was just changed to the root of a git repository, print onefetch if [ -n "$DIRCHANGED" ]; then if [ -d "$PWD/.git" ]; then - ${HOME}/bin/onefetch + if [[ "$(which onefetch)" == "" ]]; then + echo "This is a git directory, but you don't have 'onefetch' in your PATH" + else + onefetch + fi fi unset DIRCHANGED fi