-
Notifications
You must be signed in to change notification settings - Fork 4
Description
@mstackhouse Thanks for the nice example.
I see set_autos() already handles this better than read_path().
if (envsetup_environ %in% names(autos_paths)) {
autos_paths <-
autos_paths[which(names(autos_paths) == envsetup_environ):length(autos_paths)]
}I think we can add this condition around the read_path() list subsetting. So if users don't name the list and control the execution environment, it will check all paths, all the time.
This is fine for read_path(), but we need just one path for write_path(). We can add the check to write_path() to throw a nice error if lib contains more than one path and envsetup_environ is not being used to name the execution evironment, i.e. telling this where to write.
Another thought would be a new helper function to run on config files to sus this out during config creation.
What do you think? And any thoughts on documentation updates to make this more clear?
Originally posted by @nicholas-masel in #10 (comment)