Closed RoelVerbelen closed 1 year ago
Thanks for investigating. I believe this is a duplicate of #9 and may be fixed by #36.
Closing, since this was (probably) fixed in #36. Please re-open with additional comments if there is more work to be done here.
Hi @andrie
Thanks for the update. I just installed the latest version 0.3.2 in which I don't believe this issue is resolved. Here's a mininal example:
Define test.yml
as
default:
letter: 'a'
b:
letter: 'b'
shinyapps:
inherits: !expr Sys.getenv("CONFIG")
and then run
Sys.setenv("CONFIG" = "b")
config::get(file = "test.yml", config = "shinyapps")
Error in match(x, table, nomatch = 0L) :
'match' requires vector arguments
Thank you, that's helpful.
I've pushed a potential fix to the dev branch. Can you please check out the dev branch and tell me if it works for you?
That seems to have done the trick:
remotes::install_github("rstudio/config", ref = "dev")
Sys.setenv("CONFIG" = "b")
config::get(file = "test.yml", config = "shinyapps")
$letter
[1] "b"
$inherits
[1] "b"
Thank you. I've now merged this into the main branch.
Thanks a lot!
Thanks for building this great package!
I notice that using an R expression for the inherits field is currently not allowed:
triggers an error for these lines of
do_get()
:Context: Trying to use the config package to manage multiple shinyapps deployments (using different config settings for the application). I am exploring a setup in which I can specify the config setting of choice using an environment variable "CONFIG", but when deploying the shiny app to shinyapps.io I need to overwrite the driver setting (keeping all rest in occordance to selected config settings).
Current workaround for my use case is to rather do something like this: