Skip to content

Commit 08dc056

Browse files
author
Kenichi Omichi
committed
Replace false with exit 1
Some scripts contained `false` for returning 1 to callers instead of `exit 1` and that works like: $ false $ echo $? 1 $ But that made confusion in a PR review process. So this replaces `false` with `exit 1` for long-term maintenance.
1 parent db5d390 commit 08dc056

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

hack/verify-golint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ else
9494
echo 'checking by adding it to hack/.golint_failures (if your reviewer is okay with it).'
9595
echo
9696
} >&2
97-
false
97+
exit 1
9898
fi
9999

100100
if [[ ${#not_failing[@]} -gt 0 ]]; then
@@ -106,7 +106,7 @@ if [[ ${#not_failing[@]} -gt 0 ]]; then
106106
done
107107
echo
108108
} >&2
109-
false
109+
exit 1
110110
fi
111111

112112
if [[ ${#gone[@]} -gt 0 ]]; then
@@ -118,5 +118,5 @@ if [[ ${#gone[@]} -gt 0 ]]; then
118118
done
119119
echo
120120
} >&2
121-
false
121+
exit 1
122122
fi

hack/verify-shellcheck.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ else
169169
echo 'checking by adding it to hack/.shellcheck_failures (if your reviewer is okay with it).'
170170
echo
171171
} >&2
172-
false
172+
exit 1
173173
fi
174174

175175
if [[ ${#not_failing[@]} -gt 0 ]]; then
@@ -181,7 +181,7 @@ if [[ ${#not_failing[@]} -gt 0 ]]; then
181181
done
182182
echo
183183
} >&2
184-
false
184+
exit 1
185185
fi
186186

187187
# Check that all failing_packages actually still exist
@@ -199,5 +199,5 @@ if [[ ${#gone[@]} -gt 0 ]]; then
199199
done
200200
echo
201201
} >&2
202-
false
202+
exit 1
203203
fi

0 commit comments

Comments
 (0)