mirror of
https://github.com/vlang/v.git
synced 2025-09-15 10:27:19 -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 {
|
||||
mut vexe := os.getenv('VEXE')
|
||||
if vexe == '' {
|
||||
vexe = os.executable()
|
||||
}
|
||||
vexe := get_vexe()
|
||||
if 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 {
|
||||
os.system('${@VEXE} ${topic} --help')
|
||||
vexe := get_vexe()
|
||||
os.system('${os.quoted_path(vexe)} ${topic} --help')
|
||||
exit(opts.exit_code)
|
||||
}
|
||||
mut topic_path := ''
|
||||
@ -79,3 +77,11 @@ fn print_known_topics() {
|
||||
}
|
||||
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