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

test: save removing the nonexistent binary output for v fmt and v vet tests

This commit is contained in:
Delyan Angelov
2022-04-09 13:03:52 +03:00
parent 2d867a2766
commit 60e718e7c6
4 changed files with 19 additions and 20 deletions

View File

@ -332,7 +332,10 @@ pub fn execute(cmd string) Result {
// if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') {
// return Result{ exit_code: -1, output: ';, &&, || and \\n are not allowed in shell commands' }
// }
pcmd := if cmd.contains('2>') { cmd } else { '$cmd 2>&1' }
pcmd := if cmd.contains('2>') { cmd.clone() } else { '$cmd 2>&1' }
defer {
unsafe { pcmd.free() }
}
f := vpopen(pcmd)
if isnil(f) {
return Result{