mirror of
https://github.com/vlang/v.git
synced 2025-09-16 02:49:31 -04:00
v.help: run help init with the current compiler under test (#19990)
This commit is contained in:
parent
70b33105d9
commit
eaacf8314e
@ -10,10 +10,7 @@ fn hdir(base string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn help_dir() string {
|
fn help_dir() string {
|
||||||
mut vexe := os.getenv('VEXE')
|
vexe := get_vexe()
|
||||||
if vexe == '' {
|
|
||||||
vexe = os.executable()
|
|
||||||
}
|
|
||||||
if vexe != '' {
|
if vexe != '' {
|
||||||
return hdir(os.dir(vexe))
|
return hdir(os.dir(vexe))
|
||||||
}
|
}
|
||||||
@ -42,7 +39,8 @@ pub fn print_and_exit(topic string, opts ExitOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if topic in help.cli_topics {
|
if topic in help.cli_topics {
|
||||||
os.system('${@VEXE} ${topic} --help')
|
vexe := get_vexe()
|
||||||
|
os.system('${os.quoted_path(vexe)} ${topic} --help')
|
||||||
exit(opts.exit_code)
|
exit(opts.exit_code)
|
||||||
}
|
}
|
||||||
mut topic_path := ''
|
mut topic_path := ''
|
||||||
@ -79,3 +77,11 @@ fn print_known_topics() {
|
|||||||
}
|
}
|
||||||
println(res)
|
println(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn get_vexe() string {
|
||||||
|
mut vexe := os.getenv('VEXE')
|
||||||
|
if vexe == '' {
|
||||||
|
vexe = os.executable()
|
||||||
|
}
|
||||||
|
return vexe
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user