@@ -541,6 +541,7 @@ def on_config(self, config, **kwargs):
541
541
# rebuild kdf keys only if not in cache
542
542
if 'cache_file' not in self .setup and self .config ['cache_file' ]:
543
543
self .setup ['cache_file' ] = self .setup ['config_path' ].joinpath (self .config ['cache_file' ])
544
+ self .setup ['cache_file' ].parents [0 ].mkdir (parents = True , exist_ok = True )
544
545
if self .setup ['cache_file' ].exists ():
545
546
with open (self .setup ['cache_file' ], 'r' ) as stream :
546
547
self .setup ['cache' ] = yaml .safe_load (stream )
@@ -557,6 +558,7 @@ def on_config(self, config, **kwargs):
557
558
558
559
if 'sharelinks' not in self .setup and self .config ['sharelinks' ]:
559
560
self .setup ['sharelinks_output' ] = self .setup ['config_path' ].joinpath (self .config ['sharelinks_output' ])
561
+ self .setup ['sharelinks_output' ].parents [0 ].mkdir (parents = True , exist_ok = True )
560
562
self .setup ['sharelinks' ] = {}
561
563
562
564
if 'password_inventory' not in self .setup :
@@ -612,6 +614,7 @@ def on_config(self, config, **kwargs):
612
614
613
615
if self .config ['sign_files' ] and 'sign_key' not in self .setup :
614
616
sign_key_path = self .setup ['config_path' ].joinpath (self .config ['sign_key' ])
617
+ sign_key_path .parents [0 ].mkdir (parents = True , exist_ok = True )
615
618
if not sign_key_path .exists ():
616
619
logger .info ('Generating signing key and saving to "{file}".' .format (file = str (self .config ['sign_key' ])))
617
620
key = ECC .generate (curve = 'Ed25519' )
@@ -1133,6 +1136,7 @@ def on_post_build(self, config, **kwargs):
1133
1136
urls_to_verify .append (file ['url' ])
1134
1137
if signatures :
1135
1138
sign_file_path = Path (config .data ["site_dir" ]).joinpath (self .config ['sign_files' ])
1139
+ sign_file_path .parents [0 ].mkdir (parents = True , exist_ok = True )
1136
1140
with open (sign_file_path , "w" ) as file :
1137
1141
file .write (json .dumps (signatures ))
1138
1142
0 commit comments