1
0
Fork 0

Resolves "no such file or directory" CI error for firebase secret (#4356)

master
Mitchell Hentges 2019-07-30 11:10:57 -07:00 committed by GitHub
parent 4ee8a890a8
commit f671490197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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: