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

repl: minor cleanup in runner.v (#16804)

This commit is contained in:
yuyi 2022-12-29 23:55:57 +08:00 committed by GitHub
parent 36ab78d6da
commit 6a8b6c010c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,9 +58,8 @@ pub fn run_repl_file(wd string, vexec string, file string) !string {
os.rm(input_temporary_filename)!
return error('Could not execute: ${rcmd}')
}
result := r.output.replace('\r', '').replace('>>> ', '').replace('>>>', '').replace('... ',
'').replace(wd + os.path_separator, '').replace(vexec_folder, '').replace('\\',
'/').trim_right('\n\r')
result := r.output.replace_each(['\r', '', '>>> ', '', '>>>', '', '... ', '',
wd + os.path_separator, '', vexec_folder, '', '\\', '/']).trim_right('\n\r')
$if windows {
dump(rcmd)
dump(r.output)