Skip to content

Commit

Permalink
Merge pull request #161 from openpharma/dll_fix@main
Browse files Browse the repository at this point in the history
git clean the repo after installation
  • Loading branch information
Nikolas Burkoff authored Jun 30, 2022
2 parents fbf6cfc + 05255b8 commit 669f45a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
fail-fast: false
matrix:
config:
- {image: ghcr.io/insightsengineering/rstudio_4.1.2_bioc_3.14, tag: latest}
- {image: ghcr.io/insightsengineering/rstudio_4.2.1_bioc_3.15, tag: latest}
steps:
- name: Install package
run: >
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: staged.dependencies
Type: Package
Title: Install R packages from Particular Git Branches
Version: 0.2.6
Version: 0.2.7
Authors@R: c(
person("Adrian", "Waddell", email = "[email protected]", role = c("aut", "cre")),
person("Maximilian", "Mordig", email = "[email protected]", role = "aut"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# staged.dependencies 0.2.7

* Fixed a bug whereby the cache file for packages with compiled code was not reset after installation thereby `dependency_table` failed on a 2nd run.

# staged.dependencies 0.2.6

* Fixed bug whereby `renv` did not recognize internal dependencies already installed.
Expand Down
6 changes: 5 additions & 1 deletion R/git_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ install_repo_add_sha <- function(repo_dir,
# once we have installed or failed to install the package we reset the repo
# so that further operations on the repo do not fail by the above
# "the git directory contains changes" check
on.exit(git2r::reset(git2r::commits(repo_dir)[[1]], reset_type = "hard"))
on.exit({
git2r::reset(git2r::commits(repo_dir)[[1]], reset_type = "hard")
# git clean
try(unlink(file.path(repo_dir, rlang::flatten_chr(git2r::status(repo_dir)$untracked)), recursive = TRUE))
})

desc <- utils::modifyList(desc, metadata)
write_dcf(source_desc, desc)
Expand Down

0 comments on commit 669f45a

Please sign in to comment.