mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repeat.v: support --max_time limit for the average time of a command
This commit is contained in:
@ -61,6 +61,16 @@ pub fn rmrf(path string) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn exec(cmd string) ?os.Result {
|
||||
verbose_trace(@FN, cmd)
|
||||
x := os.exec(cmd) or {
|
||||
verbose_trace(@FN, '## failed.')
|
||||
return error(err)
|
||||
}
|
||||
verbose_trace_exec_result(x)
|
||||
return x
|
||||
}
|
||||
|
||||
pub fn run(cmd string) string {
|
||||
verbose_trace(@FN, cmd)
|
||||
x := os.exec(cmd) or {
|
||||
|
Reference in New Issue
Block a user