os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result (#8974)

This commit is contained in:
Delyan Angelov 2021-03-08 20:52:13 +02:00 committed by GitHub
parent 10c9f61d61
commit d7049ae2da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 423 additions and 344 deletions

View file

@ -117,7 +117,8 @@ fn main() {
if foptions.is_verbose {
eprintln('vfmt worker_cmd: $worker_cmd')
}
worker_result := os.exec(worker_cmd) or {
worker_result := os.execute(worker_cmd)
if worker_result.exit_code != 0 {
errors++
continue
}
@ -277,7 +278,7 @@ fn (foptions &FormatOptions) post_process_file(file string, formatted_file_path
}
fn (f FormatOptions) str() string {
return
return
'FormatOptions{ is_l: $f.is_l, is_w: $f.is_w, is_diff: $f.is_diff, is_verbose: $f.is_verbose,' +
' is_all: $f.is_all, is_worker: $f.is_worker, is_debug: $f.is_debug, is_noerror: $f.is_noerror,' +
' is_verify: $f.is_verify" }'