diff options
Diffstat (limited to 'src/exec.cc')
-rw-r--r-- | src/exec.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/exec.cc b/src/exec.cc index d82f5effa..fdfb467cc 100644 --- a/src/exec.cc +++ b/src/exec.cc @@ -122,7 +122,11 @@ void runProgram(const string & program, throw Error("unable to wait for child"); if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - delTmpDir.cancel(); + if (keepFailed) { + msg(lvlTalkative, + format("build failed; keeping build directory `%1%'") % tmpDir); + delTmpDir.cancel(); + } throw Error("unable to build package"); } } |