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

cmd/tools/where: check if parent already included vlib_dir (#15527)

This commit is contained in:
wahur666 2022-08-26 06:04:44 +02:00 committed by GitHub
parent fc9d2d5d5e
commit dbf28c5bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ fn (mut fdr Finder) search_for_matches() {
mut paths_to_search := []string{} mut paths_to_search := []string{}
if fdr.dirs.len == 0 && fdr.modul == '' { if fdr.dirs.len == 0 && fdr.modul == '' {
paths_to_search << [current_dir, vmod_dir] paths_to_search << [current_dir, vmod_dir]
if vlib_dir !in paths_to_search { if vlib_dir !in paths_to_search && paths_to_search.all(!vlib_dir.starts_with(it)) {
paths_to_search << vlib_dir paths_to_search << vlib_dir
} }
paths_to_search << vmod_paths paths_to_search << vmod_paths