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 (#19070)
This commit is contained in:
parent
8db1aaafd5
commit
3b3395d93b
@ -324,8 +324,8 @@ fn vpm_install_from_vcs(module_names []string, vcs_key string) {
|
|||||||
eprintln('Removing module "${minfo.final_module_path}" ...')
|
eprintln('Removing module "${minfo.final_module_path}" ...')
|
||||||
os.rmdir_all(minfo.final_module_path) or {
|
os.rmdir_all(minfo.final_module_path) or {
|
||||||
errors++
|
errors++
|
||||||
println('Errors while removing "${minfo.final_module_path}" :')
|
eprintln('Errors while removing "${minfo.final_module_path}" :')
|
||||||
println(err)
|
eprintln(err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,6 +342,14 @@ fn vpm_install_from_vcs(module_names []string, vcs_key string) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
println('Module "${name}" relocated to "${vmod_.name}" successfully.')
|
println('Module "${name}" relocated to "${vmod_.name}" successfully.')
|
||||||
|
publisher_dir := final_module_path.all_before_last(os.path_separator)
|
||||||
|
if os.is_dir_empty(publisher_dir) {
|
||||||
|
os.rmdir(publisher_dir) or {
|
||||||
|
errors++
|
||||||
|
eprintln('Errors while removing "${publisher_dir}" :')
|
||||||
|
eprintln(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
final_module_path = minfo.final_module_path
|
final_module_path = minfo.final_module_path
|
||||||
}
|
}
|
||||||
name = vmod_.name
|
name = vmod_.name
|
||||||
|
Loading…
Reference in New Issue
Block a user