Skip to content

Commit

Permalink
tools.vpm: fix has_vmod test in install_test interpreting wrong d…
Browse files Browse the repository at this point in the history
…ir as install dir (#19891)
  • Loading branch information
ttytm committed Nov 16, 2023
1 parent 4dff383 commit aa1debc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/tools/vpm/common.v
Expand Up @@ -105,8 +105,8 @@ fn parse_query(query []string) ([]Module, []Module) {
}

fn has_vmod(url string, install_path string) bool {
if os.exists((os.join_path(install_path, 'v.mod'))) {
// Safe time fetchting the repo when the module is already installed and has a `v.mod`.
if install_path != '' && os.exists((os.join_path(install_path, 'v.mod'))) {
// Skip fetching the repo when the module is already installed and has a `v.mod`.
return true
}
head_branch := os.execute_opt('git ls-remote --symref ${url} HEAD') or {
Expand Down

0 comments on commit aa1debc

Please sign in to comment.