Commit d4b04b02 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

update make_fbpy_archive.py to replace the output on Windows

Summary:
Update the code to use `os.replace()` rather than `os.rename()` so that it
won't fail on Windows if the destination path already exists.

Reviewed By: chadaustin

Differential Revision: D17462716

fbshipit-source-id: cbc06319ccb2d73868f80ab1874890ebec5a621b
parent 3ea63e0b
...@@ -140,7 +140,7 @@ def build_zipapp(args, path_map): ...@@ -140,7 +140,7 @@ def build_zipapp(args, path_map):
zipapp.create_archive( zipapp.create_archive(
inst_dir, target=tmp_output, interpreter=args.python, main=args.main inst_dir, target=tmp_output, interpreter=args.python, main=args.main
) )
os.rename(tmp_output, args.output) os.replace(tmp_output, args.output)
def create_main_module(args, inst_dir, path_map): def create_main_module(args, inst_dir, path_map):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment