Last active
March 26, 2023 03:10
-
-
Save RoyZhang7/52596795bb2ded0bd6748e695aa38b15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # By default, sudo does NOT pass the user's original PATH into the superuser process, and it gets some default PATH defined on the system. | |
| # Following cmd pass user's PATH into sudo, replacing env with the commond you want. | |
| sudo env PATH="$PATH" command | |
| # Example of passing Latexmk's PATH | |
| sudo env PATH="$PATH" latexmk -pdf -shell-escape -use-make main.tex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment