From f6714901971c180f34d76e0a59867ce211fa8b02 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Tue, 30 Jul 2019 11:10:57 -0700 Subject: [PATCH] Resolves "no such file or directory" CI error for firebase secret (#4356) --- automation/taskcluster/helper/get-secret.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/automation/taskcluster/helper/get-secret.py b/automation/taskcluster/helper/get-secret.py index 972c5fc2e..8dd9f3d5a 100644 --- a/automation/taskcluster/helper/get-secret.py +++ b/automation/taskcluster/helper/get-secret.py @@ -12,6 +12,12 @@ import taskcluster def write_secret_to_file(path, data, key, base64decode=False, json_secret=False, append=False, prefix=''): path = os.path.join(os.path.dirname(__file__), '../../../' + path) + try: + os.makedirs(os.path.dirname(path)) + except OSError as error: + if error.errno != errno.EEXIST: + raise + with open(path, 'a' if append else 'w') as f: value = data['secret'][key] if base64decode: