Skip to content

Commit 594ff6d

Browse files
Stewart MilesGerrit Code Review
authored andcommitted
Merge "Workaround directory creation racy in export_unity_package.py"
2 parents 72acb66 + a76dcfe commit 594ff6d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/ExportUnityPackage/export_unity_package.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3354,7 +3354,11 @@ def main(unused_argv):
33543354
if FLAGS.output_zip:
33553355
output_dir = tempfile.mkdtemp()
33563356
elif not os.path.exists(output_dir):
3357-
os.makedirs(output_dir)
3357+
try:
3358+
os.makedirs(output_dir)
3359+
except FileExistsError:
3360+
# This can be racy with other build scripts.
3361+
pass
33583362
elif not os.path.isdir(output_dir):
33593363
logging.error("output_dir %s is not a directory", output_dir)
33603364
return 1

0 commit comments

Comments
 (0)