mirror of
https://github.com/Hopiu/djLint.git
synced 2026-05-01 02:14:51 +00:00
attemped to fix windows permission issue w/ temp files
This commit is contained in:
parent
78fea8ed4d
commit
119cbb5b2b
1 changed files with 2 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ def main(
|
|||
stdin_stream = click.get_text_stream("stdin")
|
||||
stdin_text = stdin_stream.read()
|
||||
|
||||
temp_file = tempfile.NamedTemporaryFile()
|
||||
temp_file = tempfile.NamedTemporaryFile(delete=False)
|
||||
temp_file.write(str.encode(stdin_text))
|
||||
temp_file.seek(0)
|
||||
|
||||
|
|
@ -327,6 +327,7 @@ def main(
|
|||
|
||||
if temp_file:
|
||||
temp_file.close()
|
||||
os.unlink(temp_file.name)
|
||||
|
||||
if bool(error_count):
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue