diff --git a/CHANGELOG.md b/CHANGELOG.md index e6945b82..7bc2a190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/kibot/kiplot.py b/kibot/kiplot.py index f6c6fe85..499f0033 100644 --- a/kibot/kiplot.py +++ b/kibot/kiplot.py @@ -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 diff --git a/kibot/out_compress.py b/kibot/out_compress.py index f1cd016d..0d55f4a5 100644 --- a/kibot/out_compress.py +++ b/kibot/out_compress.py @@ -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))