mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: fix #include "@VROOT/path/x.h"
This commit is contained in:
parent
8f23accc4e
commit
35df792c05
3
vlib/v/fmt/tests/include_vroot_keep.vv
Normal file
3
vlib/v/fmt/tests/include_vroot_keep.vv
Normal file
@ -0,0 +1,3 @@
|
||||
#flag -I @VROOT/c
|
||||
#flag @VROOT/c/implementation.o
|
||||
#include "@VROOT/c/implementation.h"
|
@ -26,6 +26,9 @@ fn (mut p Parser) resolve_vroot(flag string) string {
|
||||
' or in one of its parent folders.')
|
||||
}
|
||||
vmod_path := vmod_file_location.vmod_folder
|
||||
if p.pref.is_fmt {
|
||||
return flag
|
||||
}
|
||||
return flag.replace('@VROOT', os.real_path(vmod_path))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user