diff --git a/cmd/tools/vpm.v b/cmd/tools/vpm.v
index b116ad91ed..a956037130 100644
--- a/cmd/tools/vpm.v
+++ b/cmd/tools/vpm.v
@@ -584,17 +584,22 @@ fn get_all_modules() []string {
mut read_len := 0
mut modules := []string{}
for read_len < s.len {
- mut start_token := ''
// get the start index of the module entry
mut start_index := s.index_after(start_token, read_len)
if start_index == -1 {
- break
+ start_token = ''
+ start_token = '>'
start_index = s.index_after(start_token, start_index) + start_token.len
+
// get the index of the end of module entry
end_index := s.index_after(end_token, start_index)
if end_index == -1 {