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.
1 parent 2342eea commit e091faaCopy full SHA for e091faa
R/context/set_config.R
@@ -38,7 +38,7 @@ const set_config = function(configs = list()) {
38
#' a type cast function expression invoke example as:
39
#' ``as.logical``, ``as.double``, etc maybe required.
40
#'
41
-const get_config = function(name, default = NULL) {
+const get_config = function(name, default = NULL, warn_msg = NULL) {
42
const path = strsplit(name, "$", fixed = TRUE);
43
const verbose = as.logical(getOption("verbose"));
44
@@ -60,7 +60,16 @@ const get_config = function(name, default = NULL) {
60
}
61
62
63
- return(config || default);
+ if (is.null(warn_msg)) {
64
+ return(config || default);
65
+ } else {
66
+ if (is.null(config)) {
67
+ echo_warning(warn_msg);
68
+ default;
69
70
+ config;
71
+ }
72
73
74
75
#' pull all configuration value from workflow registry
0 commit comments