Skip to content

Commit

Permalink
Add TinyTex exit code capture
Browse files Browse the repository at this point in the history
  • Loading branch information
walkowif committed Dec 5, 2023
1 parent b664a08 commit a325595
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/install_cran_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ tlmgr install makeindex metafont mfware inconsolata tex ae parskip listings xcol
tlmgr path add
'
# nolint end
system(tinytex_installer)
exit_code <- system2("bash", args = c("-c", shQuote(tinytex_installer)), stdout = FALSE, stderr = FALSE)
cat("TinyTex installation exit code:", exit_code, "\n")
if (exit_code != 0) {
quit(status = exit_code, save = "no")
}
tinytex::r_texmf()
permission_update <- '
chown -R root:staff /opt/TinyTeX
Expand All @@ -291,7 +295,11 @@ chmod -R g+wx /opt/TinyTeX/bin
export PATH=/opt/TinyTeX/bin/x86_64-linux:${PATH}
echo "PATH=${PATH}" >> ${R_HOME}/etc/Renviron
'
system(permission_update)
exit_code <- system2("bash", args = c("-c", shQuote(permission_update)), stdout = FALSE, stderr = FALSE)
cat("TinyTex permission update exit code:", exit_code, "\n")
if (exit_code != 0) {
quit(status = exit_code, save = "no")
}
}

# Update all packages
Expand Down

0 comments on commit a325595

Please sign in to comment.