8000 pre-commit does not work when used in a project with R renv · Issue #3385 · pre-commit/pre-commit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
pre-commit does not work when used in a project with R renv #3385
Closed
@lorenzwalthert

Description

@lorenzwalthert

search you tried in the issue tracker

r, renv

describe your issue

As of now, the environment variables $RENV_PROJECT and $R_PROFILE_USER are not unset during the installation process, so the hooks won't be properly installed in an R project that uses renv in an IDE like RStudio where these env variables were set already. During hook execution, the hook patch is already applied correctly.

This problem (with a reprex) was reported downstream.

I will go ahead and submit a PR to fix it, adapting the designated wrapper to call R should suffice. Hope it's ok to not provide a .pre-commit-config.yaml for this.

pre-commit --version

pre-commit 4.0.1

.pre-commit-config.yaml

Not needed

~/.cache/pre-commit/pre-commit.log (if present)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0