Skip to content

Commit 8cafbd7

Browse files
committed
Fix directories calculation
1 parent 63f4c33 commit 8cafbd7

4 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/pdfbaker/baker.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,11 @@ def __init__(
9898
logging.getLogger().setLevel(logging.INFO)
9999
self.keep_build = options.keep_build
100100

101-
# Start with defaults and apply any overrides
102101
base_config = DEFAULT_BAKER_CONFIG.copy()
103102
if options and options.default_config_overrides:
104103
base_config = deep_merge(base_config, options.default_config_overrides)
105-
106-
# Set config directory and initialize
107104
base_config["directories"]["config"] = config_file.parent.resolve()
105+
108106
self.config = self.Configuration(
109107
baker=self,
110108
base_config=base_config,

src/pdfbaker/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
raise ConfigurationError(f"Failed to load config file: {exc}") from exc
5050

5151
# Determine all relevant directories
52-
directories = {"config": config_file.parent.resolve()}
52+
self["directories"] = directories = {"config": config_file.parent.resolve()}
5353
for directory in (
5454
"documents",
5555
"pages",

src/pdfbaker/document.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def __init__(
6969
self.name = config_path.stem
7070

7171
base_config = deep_merge(base_config, DEFAULT_DOCUMENT_CONFIG)
72-
base_config["directories"]["config"] = config_path.parent.resolve()
7372

7473
self.document.log_trace_section(
7574
"Loading document configuration: %s", config_path

src/pdfbaker/page.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def __init__(
3737
self.page = page
3838

3939
self.name = config_path.stem
40-
base_config["directories"]["config"] = config_path.parent.resolve()
4140

4241
self.page.log_trace_section("Loading page configuration: %s", config_path)
4342
super().__init__(base_config, config_path)

0 commit comments

Comments
 (0)