1
0
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:
Delyan Angelov
2020-08-05 06:26:56 +03:00
parent c261408f54
commit ab7936f514
2 changed files with 10 additions and 8 deletions

View File

@@ -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