-
Notifications
You must be signed in to change notification settings - Fork 1
.Rprofile sourcing to include ~
when initializing rv globally
#203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
~
when initializing rv globally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one question about the ref but otherwise looks reasonable.
can you throw some evidence of using it, then starting R from a different directory (such that it still hits that global Rprofile, and seeing things activate correctly
src/activate.rs
Outdated
@@ -97,7 +114,7 @@ fn write_activate_file(dir: impl AsRef<Path>) -> Result<(), ActivateError> { | |||
.replace("%global wd content%", global_wd_content); | |||
// read the file and determine if the content within the activate file matches | |||
// File may exist but needs upgrade if file changes with rv upgrade | |||
let activate_file_name = &dir.join(ACTIVATE_FILE_NAME); | |||
let activate_file_name = &dir.as_ref().join(ACTIVATE_FILE_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't &dir
a ref itself, so why another as_ref()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl AsRef<Path>
--.as_ref()
--> &Path
--.join()
--> PathBuf
So I have &dir
to get &PathBuf
, but realized I should just own it here and then use references on 121 and 127
|
No description provided.