diff --git a/NEWS.md b/NEWS.md index c904e1806..0464ddce3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,8 +2,8 @@ This is a pre-release for `v0.2.0` and imposes a minimal version requirement on the [pre-commit framework](https://pre-commit.com/) (`v2.13.0`). Please see -*Installation* below for how to satisfy it. This will ensure future releases of -{precommit} building on the newly supported +*Installation/Update* below for how to satisfy it. This will ensure future +releases of {precommit} building on the newly supported [`language: r`](https://pre-commit.com/#r) will work out of the box instead of issuing messages that are confusing for most end-users. We aspire the transition to `language: r` due to the following benefits: No more manual dependency management @@ -12,11 +12,12 @@ enable the easy use of continuous integration services (enforcing hooks and auto-fixing problems with pre-commit.ci, GitHub Actions). -**Installation** +**Installation/Update** -Please follow the instructions in the [README](https://lorenzwalthert.github.io/precommit/dev/) -if you are a new user of pre-commit or if you want to update a current -installation. +Please follow the +[update instructions](https://lorenzwalthert.github.io/precommit/dev/#update) or +[installation instructions](https://lorenzwalthert.github.io/precommit/dev/#installation) +depending on whether or not you previously used pre-commit. **API changes** @@ -41,7 +42,7 @@ installation. `.R` files (#216). - In order to avoid multiple installations of the pre-commit framework, a warning is issued if multiple are found so the user can remove them (#266, - #273, #277). + #273, #277, #278). - The cache for the roxygen2 hook is now also invalidated for changes in formals if there are no changes in roxygen comments (#214). - `{renv}` infra files are not checked anymore by default in the template config diff --git a/R/exec.R b/R/exec.R index 2f04d500e..91a67c1c0 100644 --- a/R/exec.R +++ b/R/exec.R @@ -96,8 +96,8 @@ path_warn_multiple_execs <- function(paths) { "We detected multiple pre-commit executables. This is likely ", "going to get you into trouble in the future, e.g. when you want to ", "upgrade, as you easily loose track of different versions. We strongly ", - "suggest to only keep one pre-commit executable and delete the other ", - "ones. Here are the locations where we detected executables:\n\n", + "suggest to only keep one pre-commit executable and uninstall (or delete) ", + "the other ones. Here are the locations where we detected executables:\n\n", "- ", paste0(paths, collapse = "\n- "), "\n\n", "Note that in all local repos where you used pre-commit, the executable ", "path is hardcoded (in .git/hooks/pre-commit). Deleting a referenced ", @@ -194,7 +194,6 @@ path_derive_precommit_exec_conda_impl <- function(conda_env) { tryCatch( { ls <- reticulate::conda_list() - path_reticulate <- fs::path_dir(ls[ls$name == conda_env, "python"][1]) derived <- fs::path( path_reticulate,