[tbb-commits] [rbm/master] Bug 23513: run remote_finish when there was an error in remote_start

gk at torproject.org gk at torproject.org
Fri Sep 15 06:19:05 UTC 2017


commit 78d9b11aead5ba9b2386f7ebb2003772823fa293
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Thu Sep 14 14:03:27 2017 +0200

    Bug 23513: run remote_finish when there was an error in remote_start
    
    We were looking at the $remote_tmp_src and $remote_tmp_dst variables to
    decide if running remote_finish is needed. However, those variables are
    not defined if there was an error in remote_start, and we should still
    run remote_finish in that case. Instead we look at the remote_exec
    option to decide if we need to run remote_finish.
---
 lib/RBM.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/RBM.pm b/lib/RBM.pm
index b14909f..96a1b9b 100644
--- a/lib/RBM.pm
+++ b/lib/RBM.pm
@@ -1103,7 +1103,7 @@ sub build_run {
         }
     }
     EXIT:
-    if ($remote_tmp_src && $remote_tmp_dst) {
+    if (project_config($project, "remote_exec", $options)) {
         my $cmd = project_config($project, "remote_finish", $options);
         if ($cmd && (run_script($project, $cmd, sub { system(@_) }) != 0)) {
             $error ||= "Error finishing remote";



More information about the tbb-commits mailing list