mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
tools.vpm: be more specific, when handling .git
endings (#20110)
This commit is contained in:
parent
772f11494f
commit
f0fe3df0a6
2 changed files with 2 additions and 2 deletions
|
@ -108,8 +108,8 @@ fn get_ident_from_url(raw_url string) !(string, string) {
|
|||
publisher, mut name := url.path.trim_left('/').rsplit_once('/') or {
|
||||
return error('failed to retrieve module name for `${url}`.')
|
||||
}
|
||||
name = name.trim_string_right('.git')
|
||||
vpm_log(@FILE_LINE, @FN, 'raw_url: ${raw_url}; publisher: ${publisher}; name: ${name}')
|
||||
name = if name.ends_with('.git') { name.replace('.git', '') } else { name }
|
||||
return publisher, name
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ fn fetch_manifest(name string, url string, version string, is_git bool) !vmod.Ma
|
|||
}
|
||||
head_branch.output.all_after_last('/').all_before(' ').all_before('\t')
|
||||
}
|
||||
url_ := if url.ends_with('.git') { url.replace('.git', '') } else { url }
|
||||
url_ := url.trim_string_right('.git')
|
||||
// Scan both URLS. E.g.:
|
||||
// https://github.com/publisher/module/raw/v0.7.0/v.mod
|
||||
// https://gitlab.com/publisher/module/-/raw/main/v.mod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue