mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-16 21:40:24 +00:00
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
This commit is contained in:
parent
2c9995cd78
commit
57e1eecedb
1 changed files with 1 additions and 1 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue