Skip to content

Commit

Permalink
fix(stdin --check): stdin with the --check flag should return a forma…
Browse files Browse the repository at this point in the history
…tted output

stdin with --check was returning the original code, but should be returning the formatted code.

closes #486
  • Loading branch information
christopherpickering committed Dec 16, 2022
1 parent 2c9995c commit 57e1eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/djlint/reformat.py
Expand Up @@ -33,7 +33,7 @@ def reformat_file(config: Config, this_file: Path) -> dict:
if config.format_js:
beautified_code = format_js(beautified_code, config)

if config.check is not True:
if config.check is not True or config.stdin is True:
# update the file
this_file.write_text(beautified_code, encoding="utf8")

Expand Down

0 comments on commit 57e1eec

Please sign in to comment.