File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -88,24 +88,31 @@ fn main() {
88
88
manifest := vmod.from_file ('./v.mod' ) or { panic (err) }
89
89
module_names = manifest.dependencies.clone ()
90
90
}
91
- mut source := Source.vpm
92
- if module_names.all (it .starts_with ('https://' )) {
93
- source = Source.git
94
- }
91
+
95
92
if '--once' in options {
96
93
module_names = vpm_once_filter (module_names)
94
+
97
95
if module_names.len == 0 {
98
96
return
99
97
}
100
98
}
101
- if '--git' in options {
102
- source = Source.git
103
- }
104
- if '--hg' in options {
105
- source = Source.hg
99
+
100
+ external_module_names := module_names.filter (it .starts_with ('https://' ))
101
+ vpm_module_names := module_names.filter (it ! in external_module_names)
102
+
103
+ if vpm_module_names.len > 0 {
104
+ vpm_install (vpm_module_names, Source.vpm)
106
105
}
107
106
108
- vpm_install (module_names, source)
107
+ if external_module_names.len > 0 {
108
+ mut external_source := Source.git
109
+
110
+ if '--hg' in options {
111
+ external_source = Source.hg
112
+ }
113
+
114
+ vpm_install (external_module_names, external_source)
115
+ }
109
116
}
110
117
'update' {
111
118
vpm_update (module_names)
You can’t perform that action at this time.
0 commit comments