v: make launch_tool use .exe extension on windows
parent
aab1045045
commit
05329d6731
|
@ -20,7 +20,7 @@ fn launch_tool(is_verbose bool, tname string, cmdname string) {
|
|||
}
|
||||
mut compilation_options := os.args[1..tname_index].clone()
|
||||
tool_args := os.args[1..].join(' ')
|
||||
tool_exe := os.realpath('$vroot/cmd/tools/$tname')
|
||||
tool_exe := path_of_executable(os.realpath('$vroot/cmd/tools/$tname'))
|
||||
tool_source := os.realpath('$vroot/cmd/tools/${tname}.v')
|
||||
tool_command := '"$tool_exe" $tool_args'
|
||||
if is_verbose {
|
||||
|
@ -68,3 +68,10 @@ fn launch_tool(is_verbose bool, tname string, cmdname string) {
|
|||
|
||||
exit(os.system(tool_command))
|
||||
}
|
||||
|
||||
fn path_of_executable(path string) string {
|
||||
$if windows {
|
||||
return path + '.exe'
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue