fix(core): Expand tilde in config path

This commit is contained in:
Michael Carlberg 2016-05-31 06:26:08 +02:00
parent 57a9027f30
commit f8c8204a91

View File

@ -94,7 +94,7 @@ int main(int argc, char **argv)
* Load configuration file * Load configuration file
*/ */
if (cli::has_option("config")) { if (cli::has_option("config")) {
config::load(cli::get_option_value("config")); config::load(string::replace(cli::get_option_value("config"), "~", std::getenv("HOME")));
} else { } else {
auto xdg_config_home = std::getenv("XDG_CONFIG_HOME"); auto xdg_config_home = std::getenv("XDG_CONFIG_HOME");
auto home = std::getenv("HOME"); auto home = std::getenv("HOME");