Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request weaveworks#47 from weaveworks/46-shfmt
Browse files Browse the repository at this point in the history
Don't over write lint_result with 0 when shellcheck succeeds
  • Loading branch information
tomwilkie authored Nov 3, 2016
2 parents 8ab80e8 + c1d7815 commit 245ed26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion integration/assert.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ assert_end() {
# ${tests_time:0:${#tests_time}-9} - seconds
# ${tests_time:${#tests_time}-9:3} - milliseconds
if [[ -z "$INVARIANT" ]]; then
report_time=" in ${tests_time:0:${#tests_time}-9}.${tests_time:${#tests_time}-9:3}s"
idx=$((${#tests_time} - 9))
report_time=" in ${tests_time:0:${idx}}.${tests_time:${idx}:3}s"
else
report_time=
fi
Expand Down
3 changes: 1 addition & 2 deletions lint
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ lint_sh() {
# the shellcheck is completely optional. If you don't like it
# don't have it installed.
if type shellcheck >/dev/null 2>&1; then
shellcheck "${filename}"
lint_result=$?
shellcheck "${filename}" || lint_result=1
fi

return $lint_result
Expand Down

0 comments on commit 245ed26

Please sign in to comment.