pyoxidizer: make sure defaultrc directory exists before trying to write to it
When doing some work involving one-file binaries, this line is failing
for me. It seems reasonable to just make sure the destination
directory exists before splatting the file into it.
Differential Revision: https://phab.mercurial-scm.org/D9401
--- a/contrib/packaging/hgpackaging/pyoxidizer.py Sat Nov 21 13:30:50 2020 +0530
+++ b/contrib/packaging/hgpackaging/pyoxidizer.py Wed Nov 25 11:08:28 2020 -0500
@@ -127,6 +127,7 @@
# Write out a default editor.rc file to configure notepad as the
# default editor.
+ os.makedirs(out_dir / "defaultrc", exist_ok=True)
with (out_dir / "defaultrc" / "editor.rc").open(
"w", encoding="utf-8"
) as fh: