From d99fa19afc79060b00a312cdad83aff5a7056ead Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Mon, 5 Aug 2024 09:08:03 -0500 Subject: [PATCH] Error checking for post_vars (#50) * Update packages. * Fail if post_vars fails. --- helpers-generic.R | 5 ++++- renv.lock | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/helpers-generic.R b/helpers-generic.R index ac3c73c..addaebf 100644 --- a/helpers-generic.R +++ b/helpers-generic.R @@ -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) { diff --git a/renv.lock b/renv.lock index d339c10..c9cf9e4 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.4.0", + "Version": "4.4.1", "Repositories": [ { "Name": "CRAN", @@ -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", @@ -235,7 +235,7 @@ }, "gert": { "Package": "gert", - "Version": "2.0.1", + "Version": "2.1.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -246,7 +246,7 @@ "sys", "zip" ], - "Hash": "f70d3fe2d9e7654213a946963d1591eb" + "Hash": "bdc909d9f16e2478d615b0e6a7330435" }, "gh": { "Package": "gh", @@ -333,7 +333,7 @@ }, "httr2": { "Package": "httr2", - "Version": "1.0.1", + "Version": "1.0.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -350,7 +350,7 @@ "vctrs", "withr" ], - "Hash": "03d741c92fda96d98c3a3f22494e3b4a" + "Hash": "320c8fe23fcb25a6690ef7bdb6a3a705" }, "ini": { "Package": "ini", @@ -793,7 +793,7 @@ }, "usethis": { "Package": "usethis", - "Version": "2.2.3", + "Version": "3.0.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -820,7 +820,7 @@ "withr", "yaml" ], - "Hash": "d524fd42c517035027f866064417d7e6" + "Hash": "b2fbf93c2127bedd2cbe9b799530d5d2" }, "utf8": { "Package": "utf8", @@ -881,7 +881,7 @@ }, "withr": { "Package": "withr", - "Version": "3.0.0", + "Version": "3.0.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -889,7 +889,7 @@ "grDevices", "graphics" ], - "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + "Hash": "07909200e8bbe90426fbfeb73e1e27aa" }, "xml2": { "Package": "xml2", @@ -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",