On 9 January 2019 at 17:57, Iñaki Ucar wrote:
| Did you check Sys.getenv("OLDPWD")? I checked with a knitr vignette
| and the correct path was there.
Code:
[...]
<<preliminaries,echo=FALSE,results=hide>>=
prettyVersion <- packageVersion("someNameHere")
prettyDate <- format(Sys.Date(), "%B %e, %Y")
user <- Sys.getenv("USER")
dir <- getwd()
olddir <- Sys.getenv("OLDPWD")
@
[...]
\date{Built on \Sexpr{prettyDate} using version \Sexpr{prettyVersion}}
\maketitle
Built by '\Sexpr{user}' in directory '\Sexpr{dir}' coming from directory
'\Sexpr{olddir}'.
Comes up with an empty / unset olddir when I do
R CMD build someNameHere; R CMD INSTALL someNameHere_1.2.3.tar.gz
No mas :-/
Your idea about the logfile is fair, but I would *much* prefer to have
something unconditional.
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | [email protected]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel