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

vpm: install and check all modules as lowercase modules. (#6445)

This commit is contained in:
Robin Martijn
2020-09-22 17:02:42 +02:00
committed by GitHub
parent d44eabe247
commit 4774c89381

View File

@ -170,7 +170,7 @@ fn vpm_install(module_names []string) {
println('Skipping module "$name", since it uses an unsupported VCS {$vcs} .') println('Skipping module "$name", since it uses an unsupported VCS {$vcs} .')
continue continue
} }
mod_name_as_path := mod.name.replace('.', os.path_separator).replace('-', '_') mod_name_as_path := mod.name.replace('.', os.path_separator).replace('-', '_').to_lower()
final_module_path := os.real_path(os.join_path(settings.vmodules_path, mod_name_as_path)) final_module_path := os.real_path(os.join_path(settings.vmodules_path, mod_name_as_path))
if os.exists(final_module_path) { if os.exists(final_module_path) {
vpm_update([name]) vpm_update([name])
@ -340,7 +340,7 @@ fn vpm_remove(module_names []string) {
} }
fn valid_final_path_of_existing_module(name string) ?string { fn valid_final_path_of_existing_module(name string) ?string {
mod_name_as_path := name.replace('.', os.path_separator).replace('-', '_') mod_name_as_path := name.replace('.', os.path_separator).replace('-', '_').to_lower()
name_of_vmodules_folder := os.join_path(settings.vmodules_path, mod_name_as_path) name_of_vmodules_folder := os.join_path(settings.vmodules_path, mod_name_as_path)
final_module_path := os.real_path(name_of_vmodules_folder) final_module_path := os.real_path(name_of_vmodules_folder)
if !os.exists(final_module_path) { if !os.exists(final_module_path) {