mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix vtool used with paths w/spaces (win/nix)
This commit is contained in:

committed by
Alexander Medvednikov

parent
43863edc4f
commit
6d7fe1f83c
@ -399,7 +399,9 @@ pub fn system(cmd string) int {
|
||||
}
|
||||
mut ret := int(0)
|
||||
$if windows {
|
||||
ret = C._wsystem(cmd.to_wide())
|
||||
// overcome bug in system & _wsystem (cmd) when first char is quote `"`
|
||||
wcmd := if cmd.len > 1 && cmd[0] == `"` && cmd[1] != `"` { '"$cmd"' } else { cmd }
|
||||
ret = C._wsystem(wcmd.to_wide())
|
||||
} $else {
|
||||
ret = C.system(cmd.str)
|
||||
}
|
||||
|
Reference in New Issue
Block a user