Skip to content

suggest to uninstall, this is cleaner #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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**

Expand All @@ -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
Expand Down
5 changes: 2 additions & 3 deletions R/exec.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 ",
Expand Down Expand Up @@ -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,
Expand Down