diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-12-16 17:42:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-12-16 17:42:12 +0200 |
commit | ae5cab7489fe014dd3aa818cf2655d7a4714af83 (patch) | |
tree | a80fdc22ce5909b98bd58292aaf8e2bc28e70492 /build2/cli/rule.cxx | |
parent | 530e8914ba00ce0e7ee89ba30d2b88f2c09f43c9 (diff) |
Improve process execution diagnostics by reusing run_*() API
Diffstat (limited to 'build2/cli/rule.cxx')
-rw-r--r-- | build2/cli/rule.cxx | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx index 83774a3..d05b190 100644 --- a/build2/cli/rule.cxx +++ b/build2/cli/rule.cxx @@ -283,25 +283,9 @@ namespace build2 else if (verb) text << "cli " << s; - try - { - process pr (cli, args.data ()); - - if (!pr.wait ()) - throw failed (); - - t.mtime (system_clock::now ()); - } - catch (const process_error& e) - { - error << "unable to execute " << args[0] << ": " << e; - - if (e.child) - exit (1); - - throw failed (); - } + run (cli, args); + t.mtime (system_clock::now ()); return target_state::changed; } } |