Skip to content

Commit b94da8a

Browse files
authored
v.builder: add os.quoted_path() to os.system calls using v.pref.out_name, for the compress flag (fix #23685) (#23686)
1 parent f053f99 commit b94da8a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎vlib/v/builder/cc.v‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,16 +810,16 @@ pub fn (mut v Builder) cc() {
810810
break
811811
}
812812
if v.pref.compress {
813-
ret := os.system('strip ${v.pref.out_name}')
813+
ret := os.system('strip ${os.quoted_path(v.pref.out_name)}')
814814
if ret != 0 {
815815
println('strip failed')
816816
return
817817
}
818818
// Note: upx --lzma can sometimes fail with NotCompressibleException
819819
// See https://github.com/vlang/v/pull/3528
820-
mut ret2 := os.system('upx --lzma -qqq ${v.pref.out_name}')
820+
mut ret2 := os.system('upx --lzma -qqq ${os.quoted_path(v.pref.out_name)}')
821821
if ret2 != 0 {
822-
ret2 = os.system('upx -qqq ${v.pref.out_name}')
822+
ret2 = os.system('upx -qqq ${os.quoted_path(v.pref.out_name)}')
823823
}
824824
if ret2 != 0 {
825825
println('upx failed')

0 commit comments

Comments
 (0)