mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vpm: fix installation of mixed modules (#18545)
This commit is contained in:
parent
ec35d76574
commit
dd24e8a63e
@ -88,24 +88,31 @@ fn main() {
|
|||||||
manifest := vmod.from_file('./v.mod') or { panic(err) }
|
manifest := vmod.from_file('./v.mod') or { panic(err) }
|
||||||
module_names = manifest.dependencies.clone()
|
module_names = manifest.dependencies.clone()
|
||||||
}
|
}
|
||||||
mut source := Source.vpm
|
|
||||||
if module_names.all(it.starts_with('https://')) {
|
|
||||||
source = Source.git
|
|
||||||
}
|
|
||||||
if '--once' in options {
|
if '--once' in options {
|
||||||
module_names = vpm_once_filter(module_names)
|
module_names = vpm_once_filter(module_names)
|
||||||
|
|
||||||
if module_names.len == 0 {
|
if module_names.len == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if '--git' in options {
|
|
||||||
source = Source.git
|
external_module_names := module_names.filter(it.starts_with('https://'))
|
||||||
}
|
vpm_module_names := module_names.filter(it !in external_module_names)
|
||||||
if '--hg' in options {
|
|
||||||
source = Source.hg
|
if vpm_module_names.len > 0 {
|
||||||
|
vpm_install(vpm_module_names, Source.vpm)
|
||||||
}
|
}
|
||||||
|
|
||||||
vpm_install(module_names, source)
|
if external_module_names.len > 0 {
|
||||||
|
mut external_source := Source.git
|
||||||
|
|
||||||
|
if '--hg' in options {
|
||||||
|
external_source = Source.hg
|
||||||
|
}
|
||||||
|
|
||||||
|
vpm_install(external_module_names, external_source)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'update' {
|
'update' {
|
||||||
vpm_update(module_names)
|
vpm_update(module_names)
|
||||||
|
Loading…
Reference in New Issue
Block a user