1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

toml: deprecate input.auto_config() and toml.parse() (#13770)

This commit is contained in:
Larpon
2022-03-18 21:33:51 +01:00
committed by GitHub
parent 3e41be1ff4
commit 156efec278
6 changed files with 50 additions and 22 deletions

View File

@@ -354,7 +354,11 @@ fn vexe() string {
}
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('/')