From fea863081ce8a41bbd10c8d26c2409c660e0ad88 Mon Sep 17 00:00:00 2001 From: Bjoern Gruening Date: Fri, 2 Oct 2015 20:14:45 +0200 Subject: [PATCH] Add a workaround to return a proper error code if a R packge fails to install. --- .../galaxy_install/tool_dependencies/recipe/step_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py index cce632d82b8..49385a73f34 100755 --- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py @@ -1368,7 +1368,7 @@ class SetupREnvironment( Download, RecipeStep ): # Use raw strings so that python won't automatically unescape the quotes before passing the command # to subprocess.Popen. cmd = r'''PATH=$PATH:$R_HOME/bin; export PATH; R_LIBS=$INSTALL_DIR:$R_LIBS; export R_LIBS; - Rscript -e "install.packages(c('%s'),lib='$INSTALL_DIR', repos=NULL, dependencies=FALSE)"''' % \ + Rscript -e "tryCatch( install.packages(c('%s'),lib='$INSTALL_DIR', repos=NULL, dependencies=FALSE), error = exit(1))"''' % \ ( str( tarball_name ) ) cmd = install_environment.build_command( basic_util.evaluate_template( cmd, install_environment ) ) return_code = install_environment.handle_command( tool_dependency=tool_dependency,