Skip to content
New issue

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

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

Already on GitHub? # to your account

"which" command error on CentOS #451

Closed
3 tasks done
Ar-Kan opened this issue Oct 20, 2024 · 5 comments
Closed
3 tasks done

"which" command error on CentOS #451

Ar-Kan opened this issue Oct 20, 2024 · 5 comments
Assignees

Comments

@Ar-Kan
Copy link

Ar-Kan commented Oct 20, 2024

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

  • I have fully read the issue guide at https://yihui.org/issue/.
  • 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.
  • 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 Ar-Kan changed the title " "which" command error on CentOS Oct 20, 2024
@cderv
Copy link
Contributor

cderv commented Oct 21, 2024

I believe you are referring to this script ?

[ -z $(which tlmgr) ] || TL_INSTALLED_PKGS=$(tlmgr info --list --only-installed --data name | tr '\n' ' ')

@cderv cderv moved this from Backlog to Next / Ready for Dev in R Markdown Team Projects Oct 21, 2024
@Ar-Kan
Copy link
Author

Ar-Kan commented Oct 21, 2024

I believe you are referring to this script ?

[ -z $(which tlmgr) ] || TL_INSTALLED_PKGS=$(tlmgr info --list --only-installed --data name | tr '\n' ' ')

Yes, that one :)

@cderv
Copy link
Contributor

cderv commented Oct 22, 2024

@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... 😓 )

@Ar-Kan
Copy link
Author

Ar-Kan commented Oct 22, 2024

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

image

@yihui
Copy link
Member

yihui commented Oct 22, 2024

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

@yihui yihui closed this as completed in 629c81e Oct 22, 2024
@github-project-automation github-project-automation bot moved this from Next / Ready for Dev to Done in R Markdown Team Projects Oct 22, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants