We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
R_PROFILE_USER
R_PROFILE
1 parent 63be641 commit f110d94Copy full SHA for f110d94
crates/ark/src/startup.rs
@@ -150,7 +150,19 @@ fn find_site_r_profile(r_home: &PathBuf) -> Option<PathBuf> {
150
fn find_user_r_profile() -> Option<PathBuf> {
151
// Try from env var first
152
match std::env::var("R_PROFILE_USER") {
153
- Ok(path) => return PathBuf::from_str(path.as_str()).ok(),
+ Ok(path) => {
154
+ if let Some(path) = PathBuf::from_str(path.as_str()).log_err() {
155
+ if !path.exists() {
156
+ log::warn!(
157
+ "`R_PROFILE_USER` detected but '{path}' does not exist",
158
+ path = path.to_string_lossy()
159
+ );
160
+ return None;
161
+ } else {
162
+ return Some(path);
163
+ }
164
165
+ },
166
Err(_) => (),
167
};
168
0 commit comments