Is there a way to pass a shell environment variable to Rscript. For example:
Rscript -e 'devtools::install_github("private/repo",auth_token = "$GITHUB_CRED")'
I've tried this and it just passes the literal character. I'm wondering if there's another way?
Have you tried using Sys.getenv
?
Rscript -e 'devtools::install_github("private/repo", auth_token=Sys.getenv("GITHUB_CRED"))'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With