Resolves "no such file or directory" CI error for firebase secret (#4356)
parent
4ee8a890a8
commit
f671490197
|
@ -12,6 +12,12 @@ import taskcluster
|
||||||
|
|
||||||
def write_secret_to_file(path, data, key, base64decode=False, json_secret=False, append=False, prefix=''):
|
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)
|
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:
|
with open(path, 'a' if append else 'w') as f:
|
||||||
value = data['secret'][key]
|
value = data['secret'][key]
|
||||||
if base64decode:
|
if base64decode:
|
||||||
|
|
Loading…
Reference in New Issue