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

v update: add verbose output (#6080)

This commit is contained in:
Lukas Neubert 2020-08-07 17:33:13 +02:00 committed by GitHub
parent 55b8cc1bb2
commit 664c26ab4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,7 +215,7 @@ fn vpm_update(m []string) {
continue continue
} }
vcs_cmd := supported_vcs_update_cmds[vcs[0]] vcs_cmd := supported_vcs_update_cmds[vcs[0]]
verbose_println(' command: $vcs_cmd') verbose_println(' command: $vcs_cmd')
vcs_res := os.exec('$vcs_cmd') or { vcs_res := os.exec('$vcs_cmd') or {
errors++ errors++
println('Could not update module "$name".') println('Could not update module "$name".')
@ -229,6 +229,8 @@ fn vpm_update(m []string) {
verbose_println('Failed command: $vcs_cmd') verbose_println('Failed command: $vcs_cmd')
verbose_println('Failed details:\n$vcs_res.output') verbose_println('Failed details:\n$vcs_res.output')
continue continue
} else {
verbose_println(' $vcs_res.output.trim_space()')
} }
resolve_dependencies(name, final_module_path, module_names) resolve_dependencies(name, final_module_path, module_names)
} }
@ -289,8 +291,9 @@ fn vpm_list() {
println('You have no modules installed.') println('You have no modules installed.')
exit(0) exit(0)
} }
println('Installed modules:')
for mod in module_names { for mod in module_names {
println(mod) println(' $mod')
} }
} }
@ -534,7 +537,8 @@ fn get_module_meta_info(name string) ?Mod {
continue continue
} }
if r.status_code == 404 || r.text.contains('404') { if r.status_code == 404 || r.text.contains('404') {
errors << 'Skipping module "$name", since $server_url reported that "$name" does not exist.' errors <<
'Skipping module "$name", since $server_url reported that "$name" does not exist.'
continue continue
} }
if r.status_code != 200 { if r.status_code != 200 {