Fixed extra dirs created during makefile generation.

This commit is contained in:
Salvador E. Tropea 2021-02-24 14:24:22 -03:00
parent c104d14511
commit f9ac0d001f
3 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Problem when using E/DRC filters and the output dir didn't exist.
- Not all errors during makefile generation were catched (got a stack trace).
- Output dirs created when generating a makefile for a compress target.
## [0.10.1] - 2021-02-22
### Added

View File

@ -308,12 +308,12 @@ def preflight_checks(skip_pre):
BasePreFlight.run_enabled()
def get_output_dir(o_dir):
def get_output_dir(o_dir, dry=False):
# outdir is a combination of the config and output
outdir = os.path.abspath(os.path.join(GS.out_dir, o_dir))
# Create directory if needed
logger.debug("Output destination: {}".format(outdir))
if not os.path.exists(outdir):
if not dry and not os.path.exists(outdir):
os.makedirs(outdir)
return outdir

View File

@ -123,7 +123,7 @@ class CompressOptions(BaseOptions):
for out in GS.outputs:
if out.name == f.from_output:
config_output(out)
files_list = out.get_targets(get_output_dir(out.dir))
files_list = out.get_targets(get_output_dir(out.dir, dry=True))
break
if files_list is None:
logger.error('Unknown output `{}` selected in {}'.format(f.from_output, parent))