1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vrepl: make work with paths with spaces

This commit is contained in:
yuyi 2020-06-08 16:29:51 +08:00 committed by GitHub
parent 721a3a24ae
commit d4ddfa7e86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,7 +184,7 @@ fn run_repl(workdir string, vrepl_prefix string) {
if r.line.starts_with('print') { if r.line.starts_with('print') {
source_code := r.current_source_code(false) + '\n${r.line}\n' source_code := r.current_source_code(false) + '\n${r.line}\n'
os.write_file(file, source_code) os.write_file(file, source_code)
s := os.exec('"$vexe" -repl run $file') or { s := os.exec('"$vexe" -repl run "$file"') or {
rerror(err) rerror(err)
return return
} }
@ -229,7 +229,7 @@ fn run_repl(workdir string, vrepl_prefix string) {
temp_source_code = r.current_source_code(true) + '\n${temp_line}\n' temp_source_code = r.current_source_code(true) + '\n${temp_line}\n'
} }
os.write_file(temp_file, temp_source_code) os.write_file(temp_file, temp_source_code)
s := os.exec('"$vexe" -repl run $temp_file') or { s := os.exec('"$vexe" -repl run "$temp_file"') or {
rerror(err) rerror(err)
return return
} }