Skip to content

Commit c1a3751

Browse files
committed
factor out call to tool
1 parent c8c9618 commit c1a3751

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/githooks/check-file-format.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ function main-invocation() {
7575
esac
7676

7777
if command -v editorconfig > /dev/null 2>&1 && ! is-arg-true "${FORCE_USE_DOCKER:-false}"; then
78-
filter="$filter" dry_run_opt="${dry_run_opt:-}" scripts/githooks/check-file-format.sh --natively
78+
method=--natively
7979
else
80-
filter="$filter" dry_run_opt="${dry_run_opt:-}" scripts/githooks/check-file-format.sh --via-docker
80+
method=--via-docker
8181
fi
82+
83+
filter="$filter" dry_run_opt="${dry_run_opt:-}" scripts/githooks/check-file-format.sh "$method"
8284
}
8385

8486
# Run editorconfig natively.

0 commit comments

Comments
 (0)