changeset 45922:37bcd7f5a543

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
author Augie Fackler <augie@google.com>
date Wed, 25 Nov 2020 11:08:28 -0500
parents 777e8d88f703
children ead435aa5294
files contrib/packaging/hgpackaging/pyoxidizer.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: