[gnome-builder] rustup: fix cancellation of rustup installation



commit 5403c1fedcdb7d1ba5f310ed0360e0b1214e3f0d
Author: Christian Hergert <chergert redhat com>
Date:   Sun Mar 19 16:42:19 2017 -0700

    rustup: fix cancellation of rustup installation
    
    We need to pass the cancellable to spawn so that we can ensure it is force
    exited if the user clicks cancel in the UI.

 plugins/rustup/rustup_plugin/__init__.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/rustup/rustup_plugin/__init__.py b/plugins/rustup/rustup_plugin/__init__.py
index 9ca26cb..34718bc 100644
--- a/plugins/rustup/rustup_plugin/__init__.py
+++ b/plugins/rustup/rustup_plugin/__init__.py
@@ -338,7 +338,8 @@ class RustupInstaller(Ide.Transfer):
         task.connect('notify::completed', close_fds, (master_fd, slave_fd))
 
         try:
-            sub_process = launcher.spawn()
+            # pass cancellable so that if cancelled, the process force exits
+            sub_process = launcher.spawn(cancellable)
             if stdin_data:
                 os.write(master_fd, stdin_data)
             sub_process.wait_async(cancellable, self._wait_cb, task)


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