Skip to content

Commit

Permalink
Merge pull request #3515 from branfosj/20241123163528_new_pr_rpackage
Browse files Browse the repository at this point in the history
remove use of deprecated `parse_log_for_error` in `RPackage` easyblock
  • Loading branch information
lexming authored Dec 21, 2024
2 parents f293fb5 + 63719f3 commit 6ea38b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions easybuild/easyblocks/generic/rpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from easybuild.tools.build_log import EasyBuildError, print_warning
from easybuild.tools.environment import setvar
from easybuild.tools.filetools import mkdir, copy_file
from easybuild.tools.run import run_shell_cmd, parse_log_for_error
from easybuild.tools.run import run_shell_cmd


def make_R_install_option(opt, values, cmdline=False):
Expand Down Expand Up @@ -183,8 +183,10 @@ def check_install_output(self, output):
"""
Check output of installation command, and clean up installation if needed.
"""
errors = parse_log_for_error(output, regExp="^ERROR:")
errors = re.findall(r"^ERROR:.*", output, flags=re.I | re.M)

if errors:
self.log.info("R package %s failed with error:\n%s", self.name, '\n'.join(errors))
self.handle_installation_errors()
cmd = "R -q --no-save"
stdin = """
Expand Down

0 comments on commit 6ea38b6

Please # to comment.