From 57e1eecedbb2bc51978980ff3092af0c59a91efd Mon Sep 17 00:00:00 2001 From: Christopher Pickering Date: Fri, 16 Dec 2022 10:42:47 -0600 Subject: [PATCH] fix(stdin --check): stdin with the --check flag should return a formatted output stdin with --check was returning the original code, but should be returning the formatted code. closes #486 --- src/djlint/reformat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/djlint/reformat.py b/src/djlint/reformat.py index 58cbe3251..5d01dbc08 100644 --- a/src/djlint/reformat.py +++ b/src/djlint/reformat.py @@ -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")