-
-
Notifications
You must be signed in to change notification settings - Fork 50
Error: object 'never' not found on git commit #473
Copy link
Copy link
Closed
Description
Before filing a bug
- I have installed the latest dev version of {precommit} with
remotes::install_github('lorenzwalthert/precommit') - I have installed the latest hook revisions (update with
precommit::autoupdate()) - I have installed the latest release of the upstream Python framework pre-comit as described under the update instructions.
Describe the bug
I encounter the following error when running a git commit
[INFO] Installing environment for https://github.com/lorenzwalthert/precommit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Restored changes from C:\Users\USER\.cache\pre-commit\patch1678401203-36472.
An unexpected error has occurred: CalledProcessError: command: ('C:/PROGRA~1/R/R-41~1.0\\bin\\Rscript.exe', '--vanilla', '-e', ' options(install.packages.compile.from.source = "never", pkgType = "binary")\n prefix_dir <- \'C:\\\\Users\\\\USER\\\\.cache\\\\pre-commit\\\\repovawmpj_r\'\n options(\n repos = c(CRAN = "https://cran.rstudio.com"),\n renv.consent = TRUE\n )\n source("renv/activate.R")\n renv::restore()\n activate_statement <- paste0(\n \'suppressWarnings({\',\n \'old <- setwd("\', getwd(), \'"); \',\n \'source("renv/activate.R"); \',\n \'setwd(old); \',\n \'renv::load("\', getwd(), \'");})\'\n )\n writeLines(activate_statement, \'activate.R\')\n is_package <- tryCatch(\n {\n path_desc <- file.path(prefix_dir, \'DESCRIPTION\')\n suppressWarnings(desc <- read.dcf(path_desc))\n "Package" %in% colnames(desc)\n },\n error = function(...) FALSE\n )\n if (is_package) {\n renv::install(prefix_dir)\n }\n \n ')
return code: 1
stdout: (none)
stderr:
During startup - Warning messages:
1: Setting LC_COLLATE=en_US.UTF-8 failed
2: Setting LC_CTYPE=en_US.UTF-8 failed
3: Setting LC_MONETARY=en_US.UTF-8 failed
4: Setting LC_TIME=en_US.UTF-8 failed
Error in options(install.packages.compile.from.source = never, pkgType = binary) :
object 'never' not found
Execution halted
Check the log at C:\Users\USER\.cache\pre-commit\pre-commit.log
To Reproduce
I have installed Python in Windows 10 using reticulate to install miniconda as described in the README. I started with a minimal .pre-commit-config.yaml file that reproduces the above error:
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9007
hooks:
- id: style-filesAdditional context
- My operating system is: windows 10
- My project uses {renv}.
- the output of
packageVersion('renv')"0.14.0"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels