Skip to content

Commit

Permalink
setPaths --> sets options(reproducible.cachePath)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotmcintire committed Nov 23, 2018
1 parent 99f02e5 commit 8c0d470
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/misc-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,8 @@ setPaths <- function(cachePath, inputPath, modulePath, outputPath) {
if (missing(outputPath)) outputPath <- getOption("spades.outputPath") # nolint

options(spades.cachePath = cachePath, spades.inputPath = inputPath,
spades.modulePath = unlist(modulePath), spades.outputPath = outputPath)
spades.modulePath = unlist(modulePath), spades.outputPath = outputPath,
reproducible.cachePath = cachePath)

lapply(.paths(), checkPath, create = TRUE)
}
Expand Down
4 changes: 3 additions & 1 deletion R/simulation-simInit.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ setMethod(
# Make a temporary place to store parsed module files
sim@.xData[[".parsedFiles"]] <- new.env(parent = sim@.xData)
on.exit(rm(".parsedFiles", envir = sim@.xData), add = TRUE )
oldGetPaths <- getPaths()

# paths
oldGetPaths <- .paths()
do.call(setPaths, paths)
on.exit({do.call(setPaths, oldGetPaths)}, add = TRUE)
paths(sim) <- paths #paths accessor does important stuff
Expand Down

0 comments on commit 8c0d470

Please sign in to comment.