From 9527e6de5fb56877dcd9bd5bf349bee8ec71addb Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 26 Nov 2017 00:10:46 +0200 Subject: [PATCH] Skip pre-commit if virtualenv is not found --- scripts/git/pre-commit | 9 +++++++-- webapp/templates/kaehmy_list.html | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/git/pre-commit b/scripts/git/pre-commit index 989d554..5ca0d4f 100755 --- a/scripts/git/pre-commit +++ b/scripts/git/pre-commit @@ -1,9 +1,14 @@ +. "VIRTUALENV_ACTIVATE" +if [ $? -ne 0 ] +then + echo "Failed to source virtualenv. Skipping pre-commit hook." + exit 0; +fi + set -e PURPLE='\033[0;35m' NC='\033[0m' # No Color -. "VIRTUALENV_ACTIVATE" - printf "${PURPLE}Running pre-commit tests.${NC}\n" npm test pycodestyle . diff --git a/webapp/templates/kaehmy_list.html b/webapp/templates/kaehmy_list.html index 9729e01..eea449a 100644 --- a/webapp/templates/kaehmy_list.html +++ b/webapp/templates/kaehmy_list.html @@ -81,7 +81,7 @@ {% if application.official_roles|length > 0 %}
{{ application.official_roles }}
{% endif %} -

{{ application.text|linebreaks }}

+

{{ application.text|linebreaks|urlize }}

{% if application.comment_count > 0 %}