From 2815229a23e8d8c3e3449780a342d044ac253b33 Mon Sep 17 00:00:00 2001 From: PSala Date: Fri, 8 Mar 2024 11:28:25 +0100 Subject: [PATCH] Ensure deploy/patches on first diff apply --- apply_pr/fabfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apply_pr/fabfile.py b/apply_pr/fabfile.py index 76d9bdb..f266727 100644 --- a/apply_pr/fabfile.py +++ b/apply_pr/fabfile.py @@ -450,6 +450,11 @@ def parse_github_links_header(links_header): @task def export_diff_from_github(pr_number, owner='gisce', repository='erp'): + try: + local("mkdir -p %s" % 'deploy/patches') + except BaseException as e: + logger.error('Permission denied to write deploy/patches in the current directory') + raise diff_path = "deploy/patches/{}.diff".format(pr_number) tqdm.write('Exporting diff from Github') headers = {