diff options
Diffstat (limited to 'build2/cli')
-rw-r--r-- | build2/cli/init.cxx | 2 | ||||
-rw-r--r-- | build2/cli/rule.cxx | 20 |
2 files changed, 4 insertions, 18 deletions
diff --git a/build2/cli/init.cxx b/build2/cli/init.cxx index d257efa..c698fd2 100644 --- a/build2/cli/init.cxx +++ b/build2/cli/init.cxx @@ -107,6 +107,8 @@ namespace build2 { const char* args[] = {cli.string ().c_str (), "--version", nullptr}; + // @@ TODO: redo using run_start()/run_finish(). + try { pp = process::path_search (cli, true); // Can throw. 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; } } |