mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os.exec: on unix return error, when the command was not found, instead of os.Result
This commit is contained in:
@@ -148,9 +148,9 @@ pub fn exec(cmd string) ?Result {
|
||||
soutput := res.str()
|
||||
// res.free()
|
||||
exit_code := vpclose(f)
|
||||
// if exit_code != 0 {
|
||||
// return error(res)
|
||||
// }
|
||||
if exit_code == 127 {
|
||||
return error_with_code(soutput, 127)
|
||||
}
|
||||
return Result{
|
||||
exit_code: exit_code
|
||||
output: soutput
|
||||
|
Reference in New Issue
Block a user