ci: vfmt cmd/tools/vpm.v

Delyan Angelov 2022-05-27 15:22:47 +03:00 committed by Chewing_Bever
parent 16bcfa7da3
commit 1fcc248d2e
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 5 additions and 5 deletions

View File

@ -376,7 +376,7 @@ fn vpm_update(m []string) {
} }
mut errors := 0 mut errors := 0
for modulename in module_names { for modulename in module_names {
zname := url_to_module_name( modulename ) zname := url_to_module_name(modulename)
final_module_path := valid_final_path_of_existing_module(modulename) or { continue } final_module_path := valid_final_path_of_existing_module(modulename) or { continue }
os.chdir(final_module_path) or {} os.chdir(final_module_path) or {}
println('Updating module "$zname" in "$final_module_path" ...') println('Updating module "$zname" in "$final_module_path" ...')
@ -581,7 +581,7 @@ fn mod_name_info(mod_name string) ModNameInfo {
return info return info
} }
fn url_to_module_name( modulename string ) string { fn url_to_module_name(modulename string) string {
mut res := if mod := get_mod_by_url(modulename) { mod.name } else { modulename } mut res := if mod := get_mod_by_url(modulename) { mod.name } else { modulename }
if res.ends_with('.git') { if res.ends_with('.git') {
res = res.replace('.git', '') res = res.replace('.git', '')