ci: fix should_recompile_tool/2
parent
5e523fd03a
commit
87f659a0dc
|
@ -67,7 +67,9 @@ fn prepare_vfmt_when_needed() {
|
|||
}
|
||||
|
||||
fn recompile_file(vexe string, file string) {
|
||||
recompile_result := os.system('$vexe $file')
|
||||
cmd := '$vexe $file'
|
||||
println('recompilation command: $cmd')
|
||||
recompile_result := os.system(cmd)
|
||||
if recompile_result != 0 {
|
||||
eprintln('could not recompile $file')
|
||||
exit(2)
|
||||
|
|
|
@ -167,8 +167,8 @@ pub fn launch_tool(is_verbose bool, tool_name string, args []string) {
|
|||
}
|
||||
|
||||
pub fn should_recompile_tool(vexe string, tool_source string) bool {
|
||||
sfolder := os.base(tool_source)
|
||||
tool_name := os.file_name(tool_source).replace('.v', '')
|
||||
sfolder := os.dir(tool_source)
|
||||
tool_name := os.base(tool_source).replace('.v', '')
|
||||
tool_exe := os.join_path(sfolder, path_of_executable(tool_name))
|
||||
// TODO Caching should be done on the `vlib/v` level.
|
||||
mut should_compile := false
|
||||
|
|
Loading…
Reference in New Issue