Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install errors are not errors #23

Closed
aronatkins opened this issue Mar 5, 2018 · 3 comments
Closed

install errors are not errors #23

aronatkins opened this issue Mar 5, 2018 · 3 comments

Comments

@aronatkins
Copy link

I was trying to build a documentation-building Docker container using tinytex. I was (obviously) missing lots of pre-requisites, but those problems did not result in a non-zero exit status.

In a Ubuntu trusty (14.04) Docker container that contains git, curl, R (no wget), I ran the following:

R -e "devtools::install_github('yihui/tinytex')"
R -e "tinytex::install_tinytex()"
echo $?

The exit status from the R install_tinytex command was 0, which let my build appear successful.

The full output showing install_tinytex failing:

root@a1012f6f7143:/# R -e "tinytex::install_tinytex()"

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> tinytex::install_tinytex()
trying URL 'https://github.com/yihui/tinytex/raw/master/tools/install-unx.sh'
Content type 'text/plain; charset=utf-8' length 604 bytes
==================================================
downloaded 604 bytes

install-unx.sh: 13: install-unx.sh: wget: not found
mv: cannot stat 'texlive/*': No such file or directory
rm: cannot remove 'texlive': No such file or directory
install-unx.sh: 20: install-unx.sh: wget: not found
install-unx.sh: 20: install-unx.sh: /root/.TinyTeX/bin/*/tlmgr: not found
install-unx.sh: 27: install-unx.sh: /root/.TinyTeX/bin/*/tlmgr: not found
sh: 1: path: not found
sh: 1: conf: not found
TinyTeX installed to /root/.TinyTeX
You may have to restart your system after installing TinyTeX to make sure ~/bin appears in your PATH variable (https://github.com/yihui/tinytex/issues/16).
Warning message:
In tinytex::install_tinytex() :
  TinyTeX was not successfully installed or configured.Your PATH variable is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. See https://yihui.name/tinytex/faq/ for more information.
>
>
root@a1012f6f7143:/# echo $?
0

I have subsequently installed wget and see the installation succeed; this issue is more about the fact that the install was unsuccessful but did not reflect that problem.

@yihui yihui closed this as completed in 54f67ea Mar 8, 2018
@yihui
Copy link
Member

yihui commented Mar 8, 2018

Thanks for the report! Now install_tinytex() will stop if wget is not found on Linux.

@aronatkins
Copy link
Author

@yihui Is there a reason why you're not checking the exit codes for things as they run? That will catch a wider set of problems.

Here's a primitive Ubuntu instance that doesn't have wget as an example:

$ docker run -it --rm ubuntu:trusty /bin/bash
root@a437b91d9f7c:/# wget
bash: wget: command not found
root@a437b91d9f7c:/# echo $?
127

yihui added a commit that referenced this issue Mar 8, 2018
@yihui
Copy link
Member

yihui commented Mar 8, 2018

Just added the check. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants