os: remove trim_space() in os.execute() on windows, to make implementations consistent (#13272)

pull/13269/head
Subhomoy Haldar 2022-01-25 17:39:56 +05:30 committed by GitHub
parent a913983408
commit fe77e64b3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -366,7 +366,7 @@ pub fn execute(cmd string) Result {
break
}
}
soutput := read_data.str().trim_space()
soutput := read_data.str()
unsafe { read_data.free() }
exit_code := u32(0)
C.WaitForSingleObject(proc_info.h_process, C.INFINITE)

View File

@ -188,10 +188,10 @@ fn find_vs_by_reg(vswhere_dir string, host_arch string, target_arch string) ?VsI
version2 := version // TODO remove. cgen option bug if expr
// println('version: $version')
v := if version.ends_with('\n') { version2[..version.len - 2] } else { version2 }
lib_path := '$res.output\\VC\\Tools\\MSVC\\$v\\lib\\$target_arch'
include_path := '$res.output\\VC\\Tools\\MSVC\\$v\\include'
lib_path := '$res_output\\VC\\Tools\\MSVC\\$v\\lib\\$target_arch'
include_path := '$res_output\\VC\\Tools\\MSVC\\$v\\include'
if os.exists('$lib_path\\vcruntime.lib') {
p := '$res.output\\VC\\Tools\\MSVC\\$v\\bin\\Host$host_arch\\$target_arch'
p := '$res_output\\VC\\Tools\\MSVC\\$v\\bin\\Host$host_arch\\$target_arch'
// println('$lib_path $include_path')
return VsInstallation{
exe_path: p