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

vpm: don't keep empty dirs for git installs

This commit is contained in:
Turiiya 2023-08-06 23:29:55 +02:00
parent da7a9bc8ae
commit 8c7865a11d

View File

@ -342,6 +342,18 @@ fn vpm_install_from_vcs(module_names []string, vcs_key string) {
continue
}
println('Module "${name}" relocated to "${vmod_.name}" successfully.')
publisher_dir := final_module_path.all_before_last(os.path_separator)
if os.ls(publisher_dir) or {
errors++
println('Errors while getting info about "${publisher_dir}" :')
println(err)
}.len == 0 {
os.rmdir(publisher_dir) or {
errors++
println('Errors while removing "${publisher_dir}" :')
println(err)
}
}
final_module_path = minfo.final_module_path
}
name = vmod_.name