tinytex icon indicating copy to clipboard operation
tinytex copied to clipboard

"which" command error on CentOS

Open Ar-Kan opened this issue 1 year ago • 2 comments

CentOS based systems doesn't have the which command, causing an error, when installing TinyTeX from command line.

A solution would be to replace for type -P, which gives the same result and it is universal to all POSIX systems.


By filing an issue to this repo, I promise that

  • [x] I have fully read the issue guide at https://yihui.org/issue/.
  • [x] I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('tinytex'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/tinytex').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • [x] I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Ar-Kan avatar Oct 20 '24 21:10 Ar-Kan

I believe you are referring to this script ? https://github.com/rstudio/tinytex/blob/6743ffc0b7f6805108b5e45d558e19ed014e915b/tools/install-bin-unix.sh#L10

cderv avatar Oct 21 '24 09:10 cderv

I believe you are referring to this script ?

https://github.com/rstudio/tinytex/blob/6743ffc0b7f6805108b5e45d558e19ed014e915b/tools/install-bin-unix.sh#L10

Yes, that one :)

Ar-Kan avatar Oct 21 '24 16:10 Ar-Kan

@yihui how to you feel about using type -P ? this script is quite used so not a light change in case type -P can be a probleme somewhere. (I am not a UNIX expert so maybe not problem at all... 😓 )

cderv avatar Oct 22 '24 11:10 cderv

@cderv as I said in the description, both give the same result, for example

image

Ar-Kan avatar Oct 22 '24 14:10 Ar-Kan

The option -P is not available to type on macOS. I think we should use command -v instead.

yihui avatar Oct 22 '24 15:10 yihui