Skip to content

Commit

Permalink
Fix mode exits on sqlfluff_exit_code (#37)
Browse files Browse the repository at this point in the history
* fix exit sqlfluff_exit_code

* remove space to trigger tests
  • Loading branch information
kieronellis authored Jul 15, 2022
1 parent cd06010 commit 110ca54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ elif [[ "${SQLFLUFF_COMMAND}" == "fix" ]]; then
$(if [[ "x${SQLFLUFF_DISABLE_NOQA}" != "x" ]]; then echo "--disable-noqa ${SQLFLUFF_DISABLE_NOQA}"; fi) \
$(if [[ "x${SQLFLUFF_DIALECT}" != "x" ]]; then echo "--dialect ${SQLFLUFF_DIALECT}"; fi) \
$changed_files
sqlfluff_exit_code=$?
echo "::set-output name=sqlfluff-exit-code::${sqlfluff_exit_code}"

set -Eeuo pipefail
echo '::endgroup::'

Expand Down Expand Up @@ -151,7 +154,7 @@ elif [[ "${SQLFLUFF_COMMAND}" == "fix" ]]; then
set -Eeuo pipefail
echo '::endgroup::'

exit 0
exit $sqlfluff_exit_code
# exit $exit_code
# END OF fix
else
Expand Down
2 changes: 1 addition & 1 deletion testdata/test_failed_dbt/models/staging/staging_test02.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@


SELECT
1 AS x,
1 AS x,
2 AS y,
3 AS z

0 comments on commit 110ca54

Please sign in to comment.