Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 9028207

Browse files
committed
Fix format-modified Makefile target so it fails fast
In the existing version, a failure in the first command would not short-circuit execution of the second, but it should.
1 parent 67bf369 commit 9028207

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ check-aws-markers: ## Lightweight check to ensure all AWS tests have pro
135135
format: ## Run ruff to format the whole codebase
136136
($(VENV_RUN); python -m ruff check --output-format=full --fix .; python -m ruff format .)
137137

138-
format-modified: ## Run ruff to format only modified code
139-
($(VENV_RUN); \
140-
python -m ruff check --output-format=full --fix `git diff --diff-filter=d --name-only HEAD | grep '\.py$$' | xargs`; \
141-
python -m ruff format `git diff --diff-filter=d --name-only HEAD | grep '\.py$$' | xargs`)
138+
format-modified: ## Run ruff to format only modified code
139+
$(VENV_RUN); python -m ruff check --output-format=full --fix `git diff --diff-filter=d --name-only HEAD | grep '\.py$$' | xargs`
140+
$(VENV_RUN); python -m ruff format `git diff --diff-filter=d --name-only HEAD | grep '\.py$$' | xargs`
142141

143142
asf-regenerate: ## Regenerate ASF APIs
144143
$(VENV_RUN); python -m localstack.aws.scaffold upgrade

0 commit comments

Comments
 (0)