Skip to content

Commit 11911a7

Browse files
Merge pull request #278 from lorenzwalthert/improve-multiple-error
suggest to uninstall, this is cleaner
2 parents 7640323 + 6062c13 commit 11911a7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

NEWS.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This is a pre-release for `v0.2.0` and imposes a minimal version requirement
44
on the [pre-commit framework](https://pre-commit.com/) (`v2.13.0`). Please see
5-
*Installation* below for how to satisfy it. This will ensure future releases of
6-
{precommit} building on the newly supported
5+
*Installation/Update* below for how to satisfy it. This will ensure future
6+
releases of {precommit} building on the newly supported
77
[`language: r`](https://pre-commit.com/#r) will work out of the box instead of
88
issuing messages that are confusing for most end-users. We aspire the transition
99
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
1212
auto-fixing problems with pre-commit.ci, GitHub Actions).
1313

1414

15-
**Installation**
15+
**Installation/Update**
1616

17-
Please follow the instructions in the [README](https://lorenzwalthert.github.io/precommit/dev/)
18-
if you are a new user of pre-commit or if you want to update a current
19-
installation.
17+
Please follow the
18+
[update instructions](https://lorenzwalthert.github.io/precommit/dev/#update) or
19+
[installation instructions](https://lorenzwalthert.github.io/precommit/dev/#installation)
20+
depending on whether or not you previously used pre-commit.
2021

2122
**API changes**
2223

@@ -41,7 +42,7 @@ installation.
4142
`.R` files (#216).
4243
- In order to avoid multiple installations of the pre-commit framework, a
4344
warning is issued if multiple are found so the user can remove them (#266,
44-
#273, #277).
45+
#273, #277, #278).
4546
- The cache for the roxygen2 hook is now also invalidated for changes in formals
4647
if there are no changes in roxygen comments (#214).
4748
- `{renv}` infra files are not checked anymore by default in the template config

R/exec.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ path_warn_multiple_execs <- function(paths) {
9696
"We detected multiple pre-commit executables. This is likely ",
9797
"going to get you into trouble in the future, e.g. when you want to ",
9898
"upgrade, as you easily loose track of different versions. We strongly ",
99-
"suggest to only keep one pre-commit executable and delete the other ",
100-
"ones. Here are the locations where we detected executables:\n\n",
99+
"suggest to only keep one pre-commit executable and uninstall (or delete) ",
100+
"the other ones. Here are the locations where we detected executables:\n\n",
101101
"- ", paste0(paths, collapse = "\n- "), "\n\n",
102102
"Note that in all local repos where you used pre-commit, the executable ",
103103
"path is hardcoded (in .git/hooks/pre-commit). Deleting a referenced ",
@@ -194,7 +194,6 @@ path_derive_precommit_exec_conda_impl <- function(conda_env) {
194194
tryCatch(
195195
{
196196
ls <- reticulate::conda_list()
197-
198197
path_reticulate <- fs::path_dir(ls[ls$name == conda_env, "python"][1])
199198
derived <- fs::path(
200199
path_reticulate,

0 commit comments

Comments
 (0)