From patchwork Wed Nov 25 16:08:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9401: pyoxidizer: make sure defaultrc directory exists before trying to write to it From: phabricator X-Patchwork-Id: 47680 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 25 Nov 2020 16:08:44 +0000 durin42 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9401 AFFECTED FILES contrib/packaging/hgpackaging/pyoxidizer.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/contrib/packaging/hgpackaging/pyoxidizer.py b/contrib/packaging/hgpackaging/pyoxidizer.py --- a/contrib/packaging/hgpackaging/pyoxidizer.py +++ b/contrib/packaging/hgpackaging/pyoxidizer.py @@ -127,6 +127,7 @@ # Write out a default editor.rc file to configure notepad as the # default editor. + os.makedirs(out_dir / "defaultrc") with (out_dir / "defaultrc" / "editor.rc").open( "w", encoding="utf-8" ) as fh: