Skip to content

Commit

Permalink
Re-read base_path after loading config file
Browse files Browse the repository at this point in the history
Setting base_path in the config file didn't have any effect.

The config file was being loaded, but it wasn't being used to update the
wiki_options local variable, so the config file wasn't affecting the
base_path.

This change updates the wiki_options local variable after the config
file is read. Now, the base_path can be set using the config file.
  • Loading branch information
leon-sony committed Apr 27, 2024
1 parent f832f1d commit 65f2acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions LATEST_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
## Fixes & Improvements

* Fix (Docker image): add git configuration for `/wiki` as safe directory. #2006
* Fix: use `base_path` as set in config file.
2 changes: 2 additions & 0 deletions bin/gollum
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ else
# otherwise it will be relative to the CWD
cfg = File.join(Dir.getwd, cfg) unless cfg.slice(0) == File::SEPARATOR
require cfg
# The options may have been updated. Reload them.
wiki_options = Precious::App.wiki_options
end

base_path = wiki_options[:base_path]
Expand Down

0 comments on commit 65f2acc

Please sign in to comment.