mirror of
https://github.com/vlang/v.git
synced 2025-08-04 02:07:28 -04:00
v.builder: add os.quoted_path()
to os.system calls using v.pref.out_name, for the compress flag (fix #23685) (#23686)
This commit is contained in:
parent
f053f99406
commit
b94da8a6e3
@ -810,16 +810,16 @@ pub fn (mut v Builder) cc() {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if v.pref.compress {
|
if v.pref.compress {
|
||||||
ret := os.system('strip ${v.pref.out_name}')
|
ret := os.system('strip ${os.quoted_path(v.pref.out_name)}')
|
||||||
if ret != 0 {
|
if ret != 0 {
|
||||||
println('strip failed')
|
println('strip failed')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Note: upx --lzma can sometimes fail with NotCompressibleException
|
// Note: upx --lzma can sometimes fail with NotCompressibleException
|
||||||
// See https://github.com/vlang/v/pull/3528
|
// See https://github.com/vlang/v/pull/3528
|
||||||
mut ret2 := os.system('upx --lzma -qqq ${v.pref.out_name}')
|
mut ret2 := os.system('upx --lzma -qqq ${os.quoted_path(v.pref.out_name)}')
|
||||||
if ret2 != 0 {
|
if ret2 != 0 {
|
||||||
ret2 = os.system('upx -qqq ${v.pref.out_name}')
|
ret2 = os.system('upx -qqq ${os.quoted_path(v.pref.out_name)}')
|
||||||
}
|
}
|
||||||
if ret2 != 0 {
|
if ret2 != 0 {
|
||||||
println('upx failed')
|
println('upx failed')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user