This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
fix(config): relative path in config.toml should resolve relative to where config.toml is #385
Open
3 tasks done
Description
Currently, whenever a
PathBuf
is resolved withinconfig.toml
in case it is a relative path (for example:./database
), the path is resolved from the current working directory (cwd
) which leads to different configuration versions even when the same config file is used when running ursa from other directories. IMHO this is a confusing behavior since whenever aconfig.toml
is being edited by a possible user, they are laser-focused on where their config file is located when editing.Fix
An easy fix, is to change processes
cwd
to config's directory before loading the config and cd to the initial cwd after config is loaded. Or... we can use contextual loading.Checklist
The text was updated successfully, but these errors were encountered: