-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5552 from ryanlovett/datahub-scoped-creds-rstudio
Source additional env vars from Renviron.site.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
## Source any extra Renviron files. | ||
# | ||
# Since there is an existing /etc/R/Renviron.site file, we append this. It lets | ||
# us easily add new code via extraFiles (or other z2jh-related magic) | ||
# without having to rebuild the image each time. | ||
|
||
|
||
# Get a list of files in the directory | ||
env_dir <- "/etc/R/Renviron.site.d/" | ||
env_files <- list.files(env_dir, full.names = TRUE) | ||
|
||
# Iterate over each file | ||
for (env_file in env_files) { | ||
cat("Loading environment variables from:", env_file, "\n") | ||
|
||
# Read and parse the environment file | ||
readRenviron(env_file) | ||
} | ||
|