diff options
author | Peter Kuemmel <syntheticpp@gmx.net> | 2012-02-04 20:04:34 (GMT) |
---|---|---|
committer | Peter Kuemmel <syntheticpp@gmx.net> | 2012-02-04 20:04:34 (GMT) |
commit | 507af01e99deb4e72e992fe597289118556ee47d (patch) | |
tree | cf9a1c0a3a4d00fa7c161400016d4bd56406ef8b /src/build.cc | |
parent | 06315b1e2e2db9ba5dbb1d4ecf91344846c0de3a (diff) | |
download | Ninja-507af01e99deb4e72e992fe597289118556ee47d.zip Ninja-507af01e99deb4e72e992fe597289118556ee47d.tar.gz Ninja-507af01e99deb4e72e992fe597289118556ee47d.tar.bz2 |
compute command twice only in case of an error
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/build.cc b/src/build.cc index cc877e5..cfe2c65 100644 --- a/src/build.cc +++ b/src/build.cc @@ -576,10 +576,9 @@ bool Builder::StartEdge(Edge* edge, string* err) { return false; } - // Compute command and start it. - string command = edge->EvaluateCommand(); + // start command computing and run it if (!command_runner_->StartCommand(edge)) { - err->assign("command '" + command + "' failed."); + err->assign("command '" + edge->EvaluateCommand() + "' failed."); return false; } |