Skip to content

Commit 6eaadca

Browse files
theotherjimmyCruz Monrreal II
authored andcommitted
Ensure that files generated have a directory
1 parent c597377 commit 6eaadca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/export/exporters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import copy
1010

1111
from tools.targets import TARGET_MAP
12+
from tools.utils import mkdir
1213

1314

1415
class TargetNotSupportedException(Exception):
@@ -139,6 +140,7 @@ def gen_file(self, template_file, data, target_file, **kwargs):
139140
"""Generates a project file from a template using jinja"""
140141
target_text = self._gen_file_inner(template_file, data, target_file, **kwargs)
141142
target_path = self.gen_file_dest(target_file)
143+
mkdir(dirname(target_path))
142144
logging.debug("Generating: %s", target_path)
143145
open(target_path, "w").write(target_text)
144146
self.generated_files += [target_path]

0 commit comments

Comments
 (0)