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

vpm: fix the direct installation of github repositories via the --git flag (#16724)

This commit is contained in:
Swastik Baranwal 2022-12-20 21:08:08 +05:30 committed by GitHub
parent 2f9becc98d
commit d19c1ef087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,6 +306,7 @@ fn vpm_install_from_vcs(module_names []string, vcs_key string) {
return
}
minfo := mod_name_info(vmod.name)
if final_module_path != minfo.final_module_path {
println('Relocating module from "${name}" to "${vmod.name}" ( "${minfo.final_module_path}" ) ...')
if os.exists(minfo.final_module_path) {
eprintln('Warning module "${minfo.final_module_path}" already exsits!')
@ -331,6 +332,7 @@ fn vpm_install_from_vcs(module_names []string, vcs_key string) {
}
println('Module "${name}" relocated to "${vmod.name}" successfully.')
final_module_path = minfo.final_module_path
}
name = vmod.name
}
resolve_dependencies(name, final_module_path, module_names)