Skip to content

Commit 76dcb9e

Browse files
authored
check /etc/rstudio/repos.conf (#948)
1 parent 1685293 commit 76dcb9e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/ark/src/repos.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ fn find_repos_conf() -> Option<PathBuf> {
149149
if let Some(path) = find_repos_conf_xdg("ark".to_string()) {
150150
return Some(path);
151151
}
152+
153+
// RStudio respects a system-wide repos.conf in /etc/rstudio/repos.conf.
154+
//
155+
// https://solutions.posit.co/envs-pkgs/rsw_defaults/#repos.conf
156+
//
157+
// This isn't strictly XDG-compliant, but we check for it for compatibility.
158+
let rstudio_etc = PathBuf::from("/etc/rstudio/repos.conf");
159+
if rstudio_etc.exists() {
160+
return Some(rstudio_etc);
161+
}
162+
163+
// No repos.conf file found
152164
None
153165
}
154166

0 commit comments

Comments
 (0)