Skip to content

Commit

Permalink
removing endlinechar on environment variable retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashoechst committed May 11, 2020
1 parent 700b6ff commit 420df59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Misc/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
% Enables retrieval of ENV variables (https://tex.stackexchange.com/questions/62010/can-i-access-system-environment-variables-from-latex-for-instance-home/62032#62032)
\usepackage{catchfile}
\newcommand{\getenv}[2][]{%
\CatchFileEdef{\temp}{"|kpsewhich --var-value #2"}{}%
\CatchFileEdef{\temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\temp\else\let#1\temp\fi}

\getenv[\PRINT]{PRINT}
Expand Down

0 comments on commit 420df59

Please sign in to comment.