[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 78d9b11aead5ba9b2386f7ebb2003772823fa293
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
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";

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits