Skip to content

Commit

Permalink
dirty.sh: silently exit 0 when run from within VSCode
Browse files Browse the repository at this point in the history
Ignore `dirty.sh` outcomes when it's called from within VSCode.
  • Loading branch information
goneri committed Nov 28, 2024
1 parent c5b208d commit f263065
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/dirty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f263065

Please sign in to comment.