@@ -2,14 +2,6 @@
22
33set -e
44
5−function fail_maybe_explain {
6− if [ -n "$TRAVIS" ];
7− then
8− echo "Run ./check-stylish.sh locally to stylize your files / debug this"
9− fi
10− exit 1
11−}
12−
135if [ -n "$TRAVIS" ];
146then
157 mkdir -p ~/.local/bin
@@ -26,16 +18,21 @@ if [ -s stylish-out ];
2618then
2719 echo "Stylish-haskell reported an error :("
2820 cat stylish-out
29− fail_maybe_explain
21+ exit 1
3022fi
3123
3224rm stylish-out
3325
3426if git status --porcelain|grep .; # true if there was any output
3527then
36− echo "Running stylish-haskell changed 1 or more files :(";
37− fail_maybe_explain
28+ echo "Git tree is dirty after stylizing.";
29+ if [ -n "$TRAVIS" ];
30+ then
31+ echo "Since we're on Travis, this is a build failure."
32+ echo "Run ./stylize.sh to stylize your tree and push the changes."
33+ exit 1
34+ fi
3835else
39− echo "Stylish is happy :)";
36+ echo "Stylish didn't change anything :)"
4037 exit 0;
4138fi