Skip to content

Commit

Permalink
Error checking for post_vars (#50)
Browse files Browse the repository at this point in the history
* Update packages.

* Fail if post_vars fails.
  • Loading branch information
jonthegeek authored Aug 5, 2024
1 parent 836e95f commit d99fa19
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
5 changes: 4 additions & 1 deletion helpers-generic.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ read_post_vars <- function() {
read_yaml_or_null(next_file("post_vars.yaml")) %||%
read_yaml_or_null(next_file("post_vars.yml")) %||%
read_yaml_or_null(next_file("post_vars.json"))
return(post_vars)
if (length(post_vars)) {
return(post_vars)
}
cli::cli_abort("Failed to load post_vars.")
}

read_yaml_or_null <- function(url) {
Expand Down
28 changes: 14 additions & 14 deletions renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.4.0",
"Version": "4.4.1",
"Repositories": [
{
"Name": "CRAN",
Expand All @@ -21,14 +21,14 @@
},
"Rcpp": {
"Package": "Rcpp",
"Version": "1.0.12",
"Version": "1.0.13",
"Source": "Repository",
"Repository": "RSPM",
"Repository": "CRAN",
"Requirements": [
"methods",
"utils"
],
"Hash": "5ea2700d21e038ace58269ecdbeb9ec0"
"Hash": "f27411eb6d9c3dada5edd444b8416675"
},
"askpass": {
"Package": "askpass",
Expand Down Expand Up @@ -235,7 +235,7 @@
},
"gert": {
"Package": "gert",
"Version": "2.0.1",
"Version": "2.1.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -246,7 +246,7 @@
"sys",
"zip"
],
"Hash": "f70d3fe2d9e7654213a946963d1591eb"
"Hash": "bdc909d9f16e2478d615b0e6a7330435"
},
"gh": {
"Package": "gh",
Expand Down Expand Up @@ -333,7 +333,7 @@
},
"httr2": {
"Package": "httr2",
"Version": "1.0.1",
"Version": "1.0.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -350,7 +350,7 @@
"vctrs",
"withr"
],
"Hash": "03d741c92fda96d98c3a3f22494e3b4a"
"Hash": "320c8fe23fcb25a6690ef7bdb6a3a705"
},
"ini": {
"Package": "ini",
Expand Down Expand Up @@ -793,7 +793,7 @@
},
"usethis": {
"Package": "usethis",
"Version": "2.2.3",
"Version": "3.0.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -820,7 +820,7 @@
"withr",
"yaml"
],
"Hash": "d524fd42c517035027f866064417d7e6"
"Hash": "b2fbf93c2127bedd2cbe9b799530d5d2"
},
"utf8": {
"Package": "utf8",
Expand Down Expand Up @@ -881,15 +881,15 @@
},
"withr": {
"Package": "withr",
"Version": "3.0.0",
"Version": "3.0.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"grDevices",
"graphics"
],
"Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35"
"Hash": "07909200e8bbe90426fbfeb73e1e27aa"
},
"xml2": {
"Package": "xml2",
Expand All @@ -906,10 +906,10 @@
},
"yaml": {
"Package": "yaml",
"Version": "2.3.9",
"Version": "2.3.10",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "9cb28d11799d93c953f852083d55ee9e"
"Hash": "51dab85c6c98e50a18d7551e9d49f76c"
},
"zip": {
"Package": "zip",
Expand Down

0 comments on commit d99fa19

Please sign in to comment.