vgret: update to use non-deprecated toml parse functions

pull/13770/head
lmp 2022-03-18 16:16:06 +01:00
parent b978f609b3
commit 0de91767c1
1 changed files with 5 additions and 1 deletions

View File

@ -354,7 +354,11 @@ fn vexe() string {
} }
fn new_config(root_path string, toml_config string) ?Config { fn new_config(root_path string, toml_config string) ?Config {
doc := toml.parse(toml_config) ? doc := if os.is_file(toml_config) {
toml.parse_file(toml_config) ?
} else {
toml.parse_text(toml_config) ?
}
path := os.real_path(root_path).trim_right('/') path := os.real_path(root_path).trim_right('/')