1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

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
This commit is contained in:
Adam Simpkins
2019-09-18 20:02:34 -07:00
committed by Facebook Github Bot
parent a25025fb45
commit d05be9be17

View File

@@ -140,7 +140,7 @@ def build_zipapp(args, path_map):
zipapp.create_archive(
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):