File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ editor_options:
66
77# precommit v0.3.0.9000
88
9+ - Fix bug that prevented pkg load outside directories with precommit files
10+ (@mpadge , #413 ).
911- hook ` forbid-to-commit ` in template ` .pre-commit-config.yaml ` has
1012 now the correct ` exclude-files ` regular expression to ignore
1113 ` .csv ` , ` .RData ` , ` .Rds ` , ` .rds ` and ` .Rhistory ` (#410 ).
Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ ensure_renv_precommit_compat <- function(package_version_renv = utils::packageVe
179179 } else {
180180 withr :: local_dir(root )
181181 path_config <- " .pre-commit-config.yaml"
182+ if (! file_exists(path_config )) {
183+ return ()
184+ }
182185 config_lines <- readLines(path_config , encoding = " UTF-8" )
183186 has_renv <- fs :: file_exists(" renv.lock" )
184187 if (! has_renv ) {
You can’t perform that action at this time.
0 commit comments