From f263065a47a02a11a561be70ea5ec235976d09f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Wed, 27 Nov 2024 19:54:45 -0500 Subject: [PATCH] dirty.sh: silently exit 0 when run from within VSCode Ignore `dirty.sh` outcomes when it's called from within VSCode. --- tools/dirty.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/dirty.sh b/tools/dirty.sh index 6a4536c1f..916cd24e5 100755 --- a/tools/dirty.sh +++ b/tools/dirty.sh @@ -6,6 +6,9 @@ RED='\033[0;31m' NC='\033[0m' # No Color +if [ "${VSCODE_INJECTION}" = "1" ]; then + exit 0 +fi git diff --quiet --exit-code || { >&2 echo -e "${RED}ERROR: Found files either untracked missing from .gitignore or modified and tracked:${NC}" >&2 git ls-files --exclude-standard --others