File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,12 @@ def install(version=None, packages=None):
115115 if status != 'OK' :
116116 exit_code = - 1
117117
118- if len (installed_packages ):
118+ if exit_code == 0 and len (installed_packages ):
119119 print ()
120120 print ('Running post-installation steps...' )
121121 print ()
122- _run_post_execution_steps (after_rhino_install (installed_packages ))
122+ if not _run_post_execution_steps (after_rhino_install (installed_packages )):
123+ exit_code = - 1
123124
124125 print ('\n Completed.' )
125126 if exit_code != 0 :
@@ -148,6 +149,9 @@ def _run_post_execution_steps(steps_generator):
148149 for error in post_execution_errors :
149150 print (' - {}' .format (repr (error )))
150151
152+ return False
153+
154+ return True
151155
152156@compas .plugins .plugin (category = 'install' , pluggable_name = 'installable_rhino_packages' , tryfirst = True )
153157def default_installable_rhino_packages ():
Original file line number Diff line number Diff line change @@ -101,11 +101,12 @@ def uninstall(version=None, packages=None):
101101 if status != 'OK' :
102102 exit_code = - 1
103103
104- if len (uninstalled_packages ):
104+ if exit_code == 0 and len (uninstalled_packages ):
105105 print ()
106106 print ('Running post-uninstallation steps...' )
107107 print ()
108- _run_post_execution_steps (after_rhino_uninstall (uninstalled_packages ))
108+ if not _run_post_execution_steps (after_rhino_uninstall (uninstalled_packages )):
109+ exit_code = - 1
109110
110111 print ('\n Uninstall completed.' )
111112 if exit_code != 0 :
You can’t perform that action at this time.
0 commit comments