-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Push Box Path #300
Comments
If I understand correctly such a function is only really necessary because the environment variable Because otherwise you could just write options(box.path = c('YOUR_NEW_PATH', getOption('box.path')) … in other words, there wouldn’t really be a need for a dedicated If so, it might make more sense for ‘box’ to change its behaviour so that A word of caution about using |
Your assessment is correct. I personally like the idea of adding a This feature request is really just to streamline a usage pattern. I could simply type
At the top of each of my scripts, but this looks ugly and I am also lazy 😅 |
Mistakenly closed the thread. 😓 |
I have just learned that you may set up a
This should be sufficient to get the effect I would like. |
I’ve reopened the issue since I am still looking into ways of consolidating the environment variable and R option, rather than have one override the other. Regarding your solution: I generally advise against |
Thank you for your suggestion. For context, I would only use I think a hacky solution could be setting up a file in the same directory as
and in the
But again, requiring The closest thing to "working" I could get would be the following (i.e. if I were to source a
|
but the above is probably outside the scope of your current reasons for keeping the issue open. Hope this helps! |
That’s right (in this case). But isn’t the working directory precisely what you want? After all, a project-specific |
Forgive me, I was just trying to think of scenarios of why I would not use I currently cannot think of an example where we would source a |
Please describe your feature request
To allow for the default box path, retrieved by
Sys.getenv("R_BOX_PATH")
orgetOptions("box.path")
, to be prepended with additional paths.Syntax may look something like
I have started to modularize a bunch of code at my work. I like the concept of having
R_BOX_PATH
set for the production server we all work on. In the moments that I have a new git repository and I have some code that isn't appropriate for all users but should still be locally scoped to this repository, I would like a simple way to prepend the path.This feature would likely not be used within modules (as I believe prepending a search path in one module may affect how other modules work), and be for interactive use or functional scripts.
I'm aware that box can modify the search path easily with
./
or../
, but I often find that this usage pattern is most reliant for scripts written as modules or are referencing other related modules. This usage pattern is less reliant for functional scripts scripts, whose relative location may change when organizing the project.Being able to prepend the search path allows for functional scripts, who are only loading modules and not becoming a module, the ability to find the modules they need without having to fully qualify its relative location.
The text was updated successfully, but these errors were encountered: