Skip to content

Commit

Permalink
Merge pull request #8 from ArcadeAntics/main
Browse files Browse the repository at this point in the history
Fixes to accommodate upcoming update to 'this.path'
  • Loading branch information
r-leyshon authored Jun 25, 2023
2 parents eab7b77 + 5b5c21c commit 78ab4a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/memory_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ memory_report <- function() {
# perform a manual garbage collection
gc()
# show me the filename of current file
thisfile <- basename(this.path())
thisfile <- basename(if (as.numeric_version(getNamespaceVersion("this.path")) >= "2.0.0")
sys.path()
else this.path())

# message the used memory at this point
message(paste(
Expand Down
4 changes: 3 additions & 1 deletion R/wrap_up.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ wrap_up <- function(start_time = NULL) {
beep("coin")

# stop execution
stop(paste("wrap_up at", basename(this.path())))
stop(paste("wrap_up at", basename(if (as.numeric_version(getNamespaceVersion("this.path")) >= "2.0.0")
sys.path()
else this.path())))

}

0 comments on commit 78ab4a7

Please sign in to comment.