fix `v run .` on Windows

pull/816/head
Alexander Medvednikov 2019-06-29 23:41:12 +02:00
parent a2b80d5b3d
commit 159990132f
1 changed files with 5 additions and 1 deletions

View File

@ -387,6 +387,9 @@ string _STR_TMP(const char *fmt, ...) {
else {
'./' + c.out_name
}
$if windows {
cmd = c.out_name
}
if os.args.len > 3 {
cmd += ' ' + os.args.right(3).join(' ')
}
@ -394,7 +397,8 @@ string _STR_TMP(const char *fmt, ...) {
if ret != 0 {
s := os.exec(cmd)
println(s)
println('ret not 0, exiting')
println('failed to run the compiled program, this should never happen')
println('please submit a GitHub issue')
exit(1)
}
}