Content-Length: 254728 | pFad | https://github.com/pre-commit/pre-commit/issues/3385

A5 pre-commit does not work when used in a project with R renv · Issue #3385 · pre-commit/pre-commit · GitHub
Skip to content

pre-commit does not work when used in a project with R renv #3385

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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/pre-commit/pre-commit/issues/3385

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy