Skip to content

Commit 70b36f6

Browse files
committed
fix(commit): use os.unlink to remove temp file
NamedTemporaryFile doesn't have a unlink function when delete=False is used Fix commitizen-tools#1352
1 parent af28565 commit 70b36f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commitizen/commands/commit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def manual_edit(self, message: str) -> str:
8989
subprocess.call(argv)
9090
with open(file_path) as temp_file:
9191
message = temp_file.read().strip()
92-
file.unlink()
92+
os.unlink(file.name)
9393
return message
9494

9595
def __call__(self):

0 commit comments

Comments
 (0)