Skip to content

Commit b547c85

Browse files
in windows, base is just r-precommit/, not r-precommit/bin/
1 parent 025ddb1 commit b547c85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/exec.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,15 @@ path_derive_precommit_exec_conda_impl <- function(conda_env) {
207207
{
208208
ls <- reticulate::conda_list()
209209
path_reticulate <- fs::path_dir(ls[ls$name == conda_env, "python"][1])
210-
cat("path_reticulate:", path_reticulate)
210+
cat("path_reticulate:", path_reticulate, "\n")
211211
derived <- fs::path(
212-
# if windows, remove bin/ and use just base directory
213-
ifelse(is_windows(), fs::path_dir(path_reticulate), path_reticulate),
212+
# if windows, this is r-precommit, otherwise, it's r-precommit/env and use just base directory
213+
path_reticulate,
214214
# if windows, append Scripts/
215215
ifelse(is_windows(), "Scripts", ""),
216216
precommit_executable_file()
217217
)
218-
cat("derived", derived)
218+
cat("derived:", derived, "\n")
219219
unname(ifelse(file_exists(derived), derived, ""))
220220
},
221221
error = function(e) ""

0 commit comments

Comments
 (0)