Merge pull request #893 from bgruening/R_return

replace exit() with quit(), this is more portable
This commit is contained in:
John Chilton
2015-10-12 13:08:47 +01:00
@@ -1372,7 +1372,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 "tryCatch( install.packages(c('%s'),lib='$INSTALL_DIR', repos=NULL, dependencies=FALSE), error = exit(1))"''' % \
Rscript -e "tryCatch( install.packages(c('%s'),lib='$INSTALL_DIR', repos=NULL, dependencies=FALSE), error = quit(status = 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,